lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


----- Original Message -----
From: Shmuel Zeigerman
Date: 3/2/2010 9:47 AM
In 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

What follows are load times on a very fast machine with lots of RAM (much faster than the game consoles I've referred to earlier) after running the test once to cache the file in memory and then averaging several runs afterward. Bear in mind that the ASCII data is 5 times larger than the binary data, and the test below doesn't take into account disk load time.

Load asciidata.lua - 1.99 seconds
Load asciidata-luasrcdiet.lua - 1.98 seconds
Load binarydata.lua - 0.07 seconds

Is binary data important to me?  Based on the numbers above, you bet it is.

Josh