Thanks for the extra results. Obviously, a single micro-benchmark will only take you so far (and something like the Computer Language Shootout gets you farther -- it's a shame and mystifying (to me) that that site no longer has results for LuaJIT...).
But anyway, in my (limited) experimentations with LuaJIT, it's often been within a factor of 2x-3x of speed of C, which to me is pretty fast, and typical of many statically-typed, compiled languages.
I'm curious what times you get with an iterative version, or at least using a LUT. As-is, this mostly benchmarks the stack (admittedly that is an interesting datapoint.)
I don't know if anyone will ever read this thread again :), but just in case, the the current front-page post on Julia provides another nice example of a fast, dynamically-typed, JITed language (within 1-2x of C, from their own set of benchmarks).
PyPy uses JIT to improve Python run time speeds but it's still magnitudes slower than statically typed languages.
I've upped n to 40 and rerun with the following languages:
All code is available in the previous mentioned gist:https://gist.github.com/wting/77c9742fa1169179235f