There 's a "common" believe that jitted code can(hypoteticaly) run
even faster than compiled code..
see the famous hp dinamo(1999) for some insights..
http://www.hpl.hp.com/techreports/1999/HPL-1999-78.html
there are optimizations in the output native binary that are only
possible with a dinamic compiler running and getting more
introspection..
so.. i think in the near future.. statically compiled code (like C)..
will eat some dust from jitted code in the benchmarks..as this happens
already in some corner cases..
so i think a real hacker .. would just embed luajit.a into its library
or binary.. and enjoy his code flying at the light speed..
luajit already create code almost fast as c (i think i saw a big
matrix multiplication other day with a lot of inner loops running even
faster than C ) and running a dinamic language..
i think soon we will be running luajit benchmarks against hand-coded
assembly just because no one else left .. :)
On Wed, Jun 22, 2011 at 7:33 PM, HyperHacker<hyperhacker@gmail.com> wrote:
I was just wondering to myself if LuaJIT could ever be hacked to
function as a Lua compiler, that compiles scripts to standalone
executables or libraries. It'd be great if we could take advantage of
its speed and the FFI to write Lua extensions in Lua that would
normally have to be written in C... :)
--
Sent from my toaster.