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.

ObRef:
  Improving region selection in dynamic optimization systems,
  D. Hiniker, Intl. Symp. on Microarchitecture, 2005
  http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.102.9615

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

Yes.

> 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.

--Mike