lua-users home
lua-l archive

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


Ivaylo Beltchev wrote:
I was wondering if it is possible to compile a chunk using a x86 Lua using doubles, and run it on a PowerPC Lua using floats. Both are version 5.1.
There are 2 problems here - byte order and double vs. float. Is it possible (and easy) to post-process the binary output to convert from one format to the other? Can there be any other incompatibilities between the architectures?

Hacking undump to do this should be pretty easy. This: http://luaforge.net/projects/chunkspy/ can also do the job for you.

Is it even worth it?

It is like driving on the autobahn with blindfolds. On one hand, you might survive with nary a scratch, but on the other hand... I see shades of Ariane 501.

If anyone is using pre-compiled chunks, can you comment on the performance improvements you get vs. using text files?

Loading a binary chunk bypasses lexing and parsing, that's about all. With fast processors, there isn't much difference. Has anyone measured the difference?

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia