lua-users home
lua-l archive

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


On 11/03/2010, at 11:09 AM, Mike Pall wrote:
> Geoff Leyland wrote:
>> I also made a modification to the last loop of the permute
>> that's less clear cut.
> 
> That loop contributes only 1.2 percent to the total runtime. But
> for some reason your changes lead to a better region selection.

If it's any evidence,

local t=p[1]; for j=i+1,1,-1 do p[j],t=t,p[j] end

made an improvement, but

local t=p[1]; for j=i+1,2,-1 do p[j],t=t,p[j] end; p[1]=t

which has one less assignment, was not faster.

> Remember that fannkuch is run with -Ohotloop=1 on the shootout,
> since this leads to better traces. It's still a win with N=12.

Yep, I picked that up from somewhere on the shootout page.
I got similar projected results for you, though I was assuming it was the N=11 case that was the key.

> [Yes, I know the median score is not the whole story. The upper
> percentiles are still too high compared to Java or C++. I need to
> improve these the most -- even if it won't affect the score.]

Yes, I imagine this is completely pointless in the real world, but it's good publicity for Lua and LuaJIT, right?