lua-users home
lua-l archive

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

Dibyendu Majumdar <> wrote:

> I can tell you now that LLVM compilation is much slower than LuaJIT!
> But for me this is not an issue as such as I intend to compile a
> library of functions - and then use the library again and again, so
> the compilation cost is one time only.

This sounds like the sort of usage I would also be employing.

I do not know much about LuaJIT, is it a totally standalone compiler
for lua code not based on any other compiler system?

Sadly, it has been many years since I have tinkered with ASM...
think 8-bit 6502 processors... but at some future point I may have
to do some reading and learning and get up to speed on newer systems.

Hopefully I will be able to follow in your footsteps! :)

> To be fair to LuaJIT I should try to remove the compilation time in
> the comparisons - but I suspect the JIT compiler is so fast that it
> will hardly make any difference. I will look into this.

Do not waste too much time, I just thought it would be an interesting
comparison of the various compilation options for Lua.

> Re LLVM compilation times - to give you some idea - the whole Lua test
> suite (user mode) runs in less than 2 seconds in interpreter mode, but
> when forced to compile every function in LLVM it takes nearly 2
> minutes to run. So compiling functions willy nilly is not a good idea
> when using LLVM.

Hmm, I guess I am left wondering what magic LuaJIT is doing to achieve
such dramatic compilation speeds compared to LLVM or GCC?

Hopefully you will be able to decrease the complation time!

Thanks again for the update, I look forward to future updates!