lua-users home
lua-l archive

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


When testing performance I still would just not do much output during
the loop at all, outputting to /dev/null is still a
userspace/kernelspace context switch, which are expensive.

On Wed, Jan 26, 2011 at 2:31 PM, Steve Litt <slitt@troubleshooters.com> wrote:
> Hi all,
>
> I timed my prime number generator running Lua counting all primes below
> 10million, piping the output to /dev/null. With Lua it took about 9 seconds.
> With Luajit 1.6 it was about 6.5 seconds. I downloaded and built Luajit-2.0.0-
> beta4, and that ran in 1.9 seconds.
>
> Dang that's fast!
>
> SteveT
>
> Steve Litt
> Recession Relief Package
> http://www.recession-relief.US
> Twitter: http://www.twitter.com/stevelitt
>
>
>