[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Fast loading of very large "symbol" tables
- From: KHMan <keinhong@...>
- Date: Mon, 13 Oct 2008 10:16:28 +0800
Canute Bigler wrote:
Norman Ramsey wrote:
Thank you all for the responses so far. I had considered the route of
compiling the script to bytecode and then embedding it as a buffer that
I could then load. I'd not yet compared the timing difference between
the two methods.
Putting some performance numbers to David Given's comment... I did
a primitive test of loading time (source/bytecode in memory to
loaded function) for LuaSrcDiet. The numbers are in the last
section of the http://luasrcdiet.luaforge.net/ page.
To summarize, on a Sempron 3000+, bytecode loads at about
37MB/sec. Source stripped of all unnecessary bits, about 4.4MB/sec
(ballpark figure would be one magnitude difference). Source with
whitespace and comments, I guess 10-15MB/sec (just
whitespace/comments alone would be over 60MB/sec). This excludes
disk I/O overhead. For very large files or files with specific
patterns (e.g. large tables) it might be worth doing a bit of
benchmarking, if only to obtain some actual timing numbers.
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia