lua-users home
lua-l archive

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


----- Original Message -----
From: Luiz Henrique de Figueiredo
Date: 3/2/2010 1:25 PM
I would have thought a well-designed format will load much quicker, if
anything because of the simpler data structure and less memory churn.
Only a really bad format would be slower.  It'd also have the advantage
that it'd be trivial to make the data portable between different
systems, if your application runs on different architectures.
If he cares about portability of the binary data then an easy way is to
modify ldump.c and lundump.c
(Already done... so I guess I should add that my numbers are WITH an endianness check... that makes core Lua even faster.)

And for completeness, I've added LuaJIT2 numbers:

lua.exe load asciidata.lua - 1.99 seconds
lua.exe load asciidata-luasrcdiet.lua - 1.98 seconds
lua.exe load binarydata.lua - 0.07 seconds

luajit2.exe load asciidata.lua - 1.26 seconds
luajit2.exe load asciidata-luasrcdiet.lua - 1.26 seconds

Josh