lua-users home
lua-l archive

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


Hi,

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?

ChunkSpy is able to convert between the different machine
specific bytecode formats. See:
  http://luaforge.net/projects/chunkspy/

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

Loading a stripped, precompiled chunk (luac -s) is 6x - 8x faster
than loading the equivalent Lua source code (100 - 1000 lines,
including comments).

Bye,
     Mike