Hey folks! Good news, we can now run LuaJIT on Tiger and Leopard / PowerPC!
If you aren't familiar with LuaJIT, it is a just-in-time compiled implementation of Lua, a popular dynamic / "scripting" language.
What makes LuaJIT remarkable is that is one of the if not the fastest JIT implementations ever, and yet it was mostly the work of a single person, Mike Pall, and is mostly hand-crafted assembler. The benchmarks speak for themselves https://luajit.org/performance_ppc.html
Anyway, I was curious if this would run on our old Macs, but ran into compilation errors.
Some googling lead to this post from 9 years ago https://www.freelists.org/post/luajit/LuaJIT-on-PowerPC-Macs which indicated that an older version would compile. So I revived this thread here https://www.freelists.org/post/luajit/LuaJIT-on-OS-X-Leopard-PowerPC,3 and Mike Pall responded with a patch, and now the more recent versions of LuaJIT build and run!
The remaining snag is that FFI (the foreign-function interface, i.e. how you interface with libraries written in C) doesn't work, but I'll dig into this next.
If you aren't familiar with LuaJIT, it is a just-in-time compiled implementation of Lua, a popular dynamic / "scripting" language.
What makes LuaJIT remarkable is that is one of the if not the fastest JIT implementations ever, and yet it was mostly the work of a single person, Mike Pall, and is mostly hand-crafted assembler. The benchmarks speak for themselves https://luajit.org/performance_ppc.html
Anyway, I was curious if this would run on our old Macs, but ran into compilation errors.
Some googling lead to this post from 9 years ago https://www.freelists.org/post/luajit/LuaJIT-on-PowerPC-Macs which indicated that an older version would compile. So I revived this thread here https://www.freelists.org/post/luajit/LuaJIT-on-OS-X-Leopard-PowerPC,3 and Mike Pall responded with a patch, and now the more recent versions of LuaJIT build and run!
The remaining snag is that FFI (the foreign-function interface, i.e. how you interface with libraries written in C) doesn't work, but I'll dig into this next.