[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Benchmarking a custom _while loop in Lua vs. LuaJIT (and question about tail calls)
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Thu, 18 Feb 2010 16:35:08 +0100
On Thu, Feb 18, 2010 at 15:00, Mike Pall <email@example.com> wrote:
> No, both generate the same code and are the same speed. Your
> measurements are too short and your system does not provide enough
> timing accuracy (desktop Linux nowadays uses 250Hz => 4ms).
I'm on OS X, but I guess it doesn't change you point.
> $ TIMEFORMAT="%U"
> $ time luajit while.lua
> $ time luajit _while.lua
> $ time luajit _while_recursive.lua
That's amazing :-)
Tail calls as fast as native loops will bring so many possibilities...
I'm thinking of "Lambda, the Ultimate Goto" and it's siblings :-) (see
http://library.readscheme.org/page1.html for those who haven't read