Now with the power of LuaJIT

Two updates in two days? Wow.

This is a switch I have been planning for a while, but now that LuaJIT has gained awesome FFI abilities, it just seemed like the right time.

Brat now ships with LuaJIT instead of standard Lua and readline has been replaced with the much smaller and simpler linenoise. The main difference you are likely to notice is the incredible speed increase (because of LuaJIT, not linenoise):

examples/tak.brat

Lua:
10.45 user 0.05 system 0:10.51 elapsed

LuaJIT:
3.55 user 0.01 system 0:03.73 elapsed

examples/fibonacci.brat

Lua:
2.43 user 0.02 system 0:02.58 elapsed

LuaJIT:
0.83 user 0.01 system 0:00.88 elapsed

examples/tree.brat

Lua:
15.97 user 0.04 system 0:16.11 elapsed

LuaJIT:
6.71 user 0.05 system 0:06.82 elapsed

examples/rosetta_code/hailstone.brat

Lua:
397.99 user 0.19 system 6:42.22 elapsed

LuaJIT:
153.18 user 0.49 system 2:35.09 elapsed

If anyone runs into issues on OS X, please let me know. I’m flying blind when it comes to updating the OSX build stuff.

comments by Disqus
Fork me on GitHub