[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.1 a little slower than 5.0.2
- From: Ben Sunshine-Hill <sneftel@...>
- Date: Fri, 24 Sep 2004 17:28:46 -0700
seems a kind of silly benchmark; the bulk of the code does absolutely
nothing with garbage collected types, which is the major area where
5.1 does better. When I need to do math ops huge arrays, I do it on
the C side anyway. This is why "shootout" style benchmarks aren't
usually very useful: the type of programming they encourage is not the
same as the type of programming that usually goes on in production
code.
Ben
On Fri, 24 Sep 2004 18:01:39 -0500, Tom Spilman <tom@sickheadgames.com> wrote:
>
> FYI. This is a comparison of the array test from the language shootout run
> on my P4 2.8GHz with 1GB of memory. The code:
>
> function array_test( n )
>
> local x, y = {}, {}
>
> for i=1,n do
> x[i] = i
> y[i] = 0
> end
>
> for k=1,1000 do
> for j=n,1,-1 do
> y[j] = y[j] + x[j]
> end
> end
>
> return y[1] .. " " .. y[n]
> end
>
> I wrapped it with os.clock() calls and got these results:
>
> Lua 5.0.2
> 1000 - 0.312s
> 3000 - 0.891s
> 5000 - 1.515s
> 7000 - 2.11s
>
> Lua 5.1 (work2)
> 1000 - 0.343s
> 3000 - 1.032s
> 5000 - 1.718s
> 7000 - 2.407s
>
> This is as compiled on VC++ .NET 2003. Looking at my old tests it seems
> like 5.0.2 compiled with VC++ 6 is faster at less than .3s for n=1000. I
> need to reinstall 6 and check this again to be sure, but has anyone else
> noticed this?
>
> Tom Spilman
> Co-owner | Programmer
> www.sickheadgames.com
>
>