[Icfp04-discuss] simulator speed

Jeff Franklin JeffreyFranklin at comcast.net
Sun Jun 6 19:25:40 EDT 2004


Hi Martin,

Yep, all ants are indexed by id, the grid information is in an indexed array.  
Map information is read into the array, and so are the states.  All 
comparisons are integer/integer comparison (usually enums).  Any other ideas 
why it would be running so slow?  I did implement everything exactly like it 
was specified in the pdf, could that be the reason, all the function call 
overhead?  But if that was the reason, inlining should take care of most of 
that.  I just checked and my only for loops are d = 0 to 5.

-Jeff

On Sunday 06 June 2004 05:49 pm, you wrote:
> Hi Jeff,
>
> my simulator (in C#, P4 1.2 GHz) needs about 17 seconds for 100000
> iterations.
> Do you keep a list of all your ants, so that you can find them easily
> (without searching the whole field)?
> Storing the commands in also useful.
>
> Martin.
>
> > Just curious, how long does it take your simulators to run through 100000
> > iterations?  It's taking mine about 2 hours (on a P4 3GHz), so I've just
> > been running through 5000 or 10000 and seeing how it does, which only
> > takes about 10 or 20 minutes (respectively).  Is this normal?  Does
> > everyones simulator run this slow?  All my map/ant lookups are O(1), and
> > I have all the C++ compiler optimizations on (-O3 -funroll-loops
> > -fomit-frame-pointer), and I turned off all the output.
> >
> > Thanks,
> > -Jeff
> > _______________________________________________
> > Icfp04-discuss mailing list
> > Icfp04-discuss at lists.seas.upenn.edu
> > http://lists.seas.upenn.edu/mailman/listinfo/icfp04-discuss


More information about the Icfp04-discuss mailing list