|
Joshua Jensen wrote:
----- Original Message ----- From: Shmuel Zeigerman Date: 3/2/2010 9:47 AMIn my experience, ASCII Lua-files after deletion of redundant whitespace characters are usually smaller than their binaries.So, here we go. I'll use exact bytes this time: asciidata.lua - 134,280,891 bytes asciidata-luasrcdiet.lua - 133,759,270 bytes binarydata.lua after luac - 26,654,637 bytes
Computer-generated code would probably not have much whitespace-type bits to cut out of course, so not much of a point even trying lstrip or LuaSrcDiet there...
Interesting difference in size, possibly indicative of a regular pattern or something more bulky than usual. Would be interested in a snippet as an indication of what asciidata.lua looks like... curious.
Load asciidata.lua - 1.99 seconds Load asciidata-luasrcdiet.lua - 1.98 seconds Load binarydata.lua - 0.07 seconds
I measured the in-memory parsing/loading difference at about 9. It looks to me that there might be a pattern in asciidata.lua that is making parsing slower. Just a wild stab in the dark...
But no matter, binary chunks are fast.Still, if binary chunks on LuaJIT2 is a moving target, then I guess you would need to either contribute code (and track a moving target) or sponsor its development...
-- Cheers, Kein-Hong Man (esq.) Kuala Lumpur, Malaysia