lua-users home
lua-l archive

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

David Given wrote:
> At this point the illustrious reader may wish to insert my standard rant
> on the evils of languages with no 'goto' (which I'm sure you've all
> heard before).

Actually LJ2 makes extensive use of the fact that Lua doesn't have
a goto. This enables the use of a new region-selection algorithm,
which I termed NLF (natural-loop-first). IMHO it outperforms NET
(next-executed tail) and LEI (last-executed iteration) which has
previously been used for trace compilers.

  Improving region selection in dynamic optimization systems,
  D. Hiniker, Intl. Symp. on Microarchitecture, 2005

> I'm assuming that all the argument passing would usually turn into no
> code in LuaJIT due to the way the trace compiler works.


> Actually, Clue uses some of the shootout benchmarks as unit tests.
> Results follow:

Since others may be misinterpreting this: these are the results
for a C->Lua translation (and, as we have discussed, a rather
suboptimal one). The native Lua variants of these benchmarks run
*much* faster.