lua-users home
lua-l archive

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


* Roberto Ierusalimschy:

> I was doing some quick-and-dirty benchmarks about 'table.move'. The
> file 'temp' is here:
>
> --------------------------------------------------------------
> local a = {}
> local lim = 10000
> local rep = 1000
> for i = 1, lim do a[i] = i end
>
> local t = os.clock()
> for i = 1, rep do table.move(a, 1, lim, 2) end
> print(os.clock() - t)
> --------------------------------------------------------------
>
> Now, see how the times change with the name of the executable:

Something extremely similar has been observed before:

Todd Mytkowicz, Amer Diwan, Matthias Hauswirth, Peter F. Sweeney,
“Producing Wrong Data Without Doing Anything Obviously Wrong!”

<http://www-plan.cs.colorado.edu/klipto/mytkowicz-asplos09.pdf>