Comment by ay
14 years ago
for the comments: that's a matter of taste, IMHO.
for bitwise ops: look at 5.2, it has it now. 32-bit operations.
floating point arithmetic: in practice, I haven't seen it as a problem as soon as I stay within the 32-bit range - then the numbers can be represented exactly, so the abstraction works well.
OOP: can't say for it, I did not do it much.
For the "fast" - check luajit (http://luajit.org/) - it is near-native speed while remaining reasonably slow.
And the FFI in luajit is simply fantastic. Take a look at https://github.com/justincormack/ljsyscall which binds the syscalls.
The annoyance that I'd thought of is that the array indexing starts with one, not zero - this brings some headaches during the index calculations. But this also forces to rethink the logic to use more of iterators, and abstract away from the indices. So, after all, it is not that big of a deal.
oh yeah, the array indexing starting with one is the one I forgot from my list!
I'm developing for an arm processor with no floating point support. so it's best to avoid the software fallback at all costs.
I'm aware of luajit but "plain" lua is still fast enough for my uses. FFI is definitely a killer and beats SWIG hands down.
need to upgrade to 5.2 asap...
Oh on arm you will definitely will want to check out luajit precisely for the number performance - see this comment for details : http://luajit.org/performance_arm.html shows 85x speedup for md5, which I suppose would be integer algorithm.
Out of curiosity, what is the platform, if not a secret ?