[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: why benchmarks need salt
- From: Luke Mewburn <luke@...>
- Date: Tue, 21 Jul 2015 07:33:26 +1000
On Mon, Jul 20, 2015 at 01:00:47PM -0300, Roberto Ierusalimschy wrote:
| 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:
|
| roberto@arraial:~/prj/lua$ lua temp
| 0.91
| roberto@arraial:~/prj/lua$ lua temp
| 0.91
| roberto@arraial:~/prj/lua$ mv lua lua1
| roberto@arraial:~/prj/lua$ lua1 temp
| 0.57
| roberto@arraial:~/prj/lua$ lua1 temp
| 0.57
| roberto@arraial:~/prj/lua$ mv lua1 sol
| roberto@arraial:~/prj/lua$ sol temp
| 0.91
| roberto@arraial:~/prj/lua$ sol temp
| 0.91
| roberto@arraial:~/prj/lua$ mv sol sol1
| roberto@arraial:~/prj/lua$ sol1 temp
| 0.57
| roberto@arraial:~/prj/lua$ sol1 temp
| 0.58
Do you have different programs called "lua" or "sol" in your PATH
that are getting executed instead of the copy in the current
directory?
Or is this definitely a reproducible problem on your platform when the
argv[0] is any 3 character string?
(I don't have "." in my PATH, even at the end, to avoid issues running
the "wrong" version of a program when cd-ed to arbitrary directories.)
regards,
Luke.
Attachment:
pgpGiviQ5dRg8.pgp
Description: PGP signature