lua-users home
lua-l archive

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


On 10/03/2010, at 2:00 PM, Mike Pall wrote:
> Geoff Leyland wrote:
>> This (possibly non-confirming but field name using) version of
>> advance seems to be about 6% better on nbody.  But it won't move
>> the damn median!
> 
> Every percent counts, so please submit it:
>  http://shootout.alioth.debian.org/help.php#contribute
> 
> --Mike

Modifying the flip loop in fannkuch from:

for flips=1,1000000 do
  ...
end

to

local flips = 1
while true do
  ...
  flips=flips+1
end

saves a few percent on fannkuch - I guess because we drop the check against a million?
I also made a modification to the last loop of the permute that's less clear cut.
Submitted.

Cheers,
Geoff