Alek Paunov wrote:
On 13.11.2012 18:35, Richard W.M. Jones wrote:
> This seems about right to me: Both ocamlopt & gcc generate native
> x86-64 programs, but there's a small amount of overhead in the OCaml
> binary (initializing the minor heap of the GC).
>
luajit too (it is one of the fastest compilers)
Unlike the others, it generates the native code at runtime (Just In Time),
so there is a performance penalty (especially for nontrivial programs) for
the (JIT) compilation which gcc and ocamlopt won't have. The quality of the
generated code could also be a problem (for nonempty programs): Optimized
compilation takes time! So there's a tradeoff between the time of the JIT
compilation and the time of the actual execution, a very fast JIT is not
necessarily optimal because it may be missing important optimizations of the
compiled code.
In other words: Try nontrivial benchmarks before claiming victory.
Kevin Kofler