Dramatic slowdown -ping Rob

new topic     » topic index » view thread      » older message » newer message

I've narrowed down the unexpected performance hit I mentioned earlier
today (Re: Contest Update (12-Nov-2004))

If INNER is 27, this completes in 0.27 seconds. If it is 28, it takes
3.19 seconds, over tenfold performance drop. Why?

Does anyone else get these results? You may need to massage the
figures a little to account for memory/cpu differences.

Rob, if you manage to duplicate this performance hit on 2.4, do you
get the same on 2.5?

constant START = time()
constant INNER=28
sequence table
		table=repeat(repeat(0,INNER),1024)
integer used
		used=1

for i=1 to 45000 do
	used+=1
	if used>length(table) then table&=repeat(repeat(0,INNER),1024) end
if
	table[used][5]=used
end for

printf(1, "Elapsed time: %f\n", time() - START)


Regards,
Pete
PS the performance hit disappears if I initialise the table to 40,000
entries

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu