lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hallo,

On Tue, May 25, 2010 at 4:04 AM, Antonio Vieiro
<antonio@antonioshome.net> wrote:
> Hi,
>
> As far as I undestand JIT optimization gives better results than any
> sort of static code optimization [1]. This is, JIT can outperform any
> optimization done by any compiler statically.
>

     In theory this is true, but there are passes that take time and
must occur in real-time with a JIT, like register allocation. JITs
usually use a faster algorithm that gives somewhat worse results.

> So if you're seeking a gain in performance by compiling lua to C then
> you should reconsider using a JIT instead.
>

     Unfortunately GCC has a vastly superior number of targets
implemented than LuaJIT, which gives us x86 and soon x86-64.

Cheers,
-- 
-alex
http://www.ventonegro.org/