[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua Benchmark
- From: erik@... (Erik Hougaard)
- Date: Tue, 20 Jul 1999 19:57:21 +0200
Roberto Ierusalimschy wrote:
>
> You can make the code ~20% faster using local variables:
>
> function sieve(n)
> local x = {}
>From the "correctness" perspective x should be a global variable,
otherwise your would not be able to read the sieve list afterward.. But
from a performance perspective it interesting to know what the
performance gain is with local variables.
But what we should do is create a static benchmark suite of functions so
we can compare each others inplementations, different compilers, OS'ses
etc.. and that benchmark should include both local and global variables.
I was think about adding a recusive function to test the stack depth
performance .. Other suggestions ?
/Erik