Author Topic: Perf changes in 2.43.1f  (Read 6859 times)

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Perf changes in 2.43.1f
« on: April 02, 2008, 11:06:34 AM »
I'm curious as to what if any performance improvements people have experienced with 2.43.1f.   Any quantitatvie data on before and after cycles/sec and sim size (both bot number and field size) etc. would be welcome.
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Perf changes in 2.43.1f
« Reply #1 on: April 02, 2008, 05:22:47 PM »
The solid bots seem to improve performance a lot. If I just tap the magnifyer to zoom in a bit to display the bot details I get a decrease in speed with several cycles/sec. But as far as I've seen the performance boost is greater the faster the sim is running. A sim running at 1 cycle/sec will not have any performance boost nomatter what I click on.
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Perf changes in 2.43.1f
« Reply #2 on: April 02, 2008, 07:43:53 PM »
What about overall sim speed ups?  Eric fixed a system I started a few years ago that should make the version faster (it would be most apparent if graphics were disabled).

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Perf changes in 2.43.1f
« Reply #3 on: April 02, 2008, 08:27:40 PM »
My performance test:

1. Normal speed fully zoomed out: 14 cycles/sec.

2. One tap on 'zoom in' magnifyer to display bot details: 8.4 cycles/sec.

3. Maximum zoom in on 1 bot: 16.3 cycles/sec.

4. Fully zoomed out and activating 'Toggle Fast Mode' button: 17.9 cycles/sec.

5. Toggling 'Flicker mode' does nothing.

6. Clicking on the 'Smiley' button to turn bots into plants and ants will make the sim look frozen and slow it down to below 1 cycle/sec. This function will choke DB completely!

7. Turning off graphics by clicking on the button with the monitor: 17.4 cycles/sec.
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Perf changes in 2.43.1f
« Reply #4 on: April 02, 2008, 08:32:05 PM »
Yes, but do you find 2.43.1f faster than previous versions?
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Perf changes in 2.43.1f
« Reply #5 on: April 02, 2008, 08:51:23 PM »
Yes, I think there is some improvement compared to earlier versions. Not sure exactly which of you latest drops though. Didn't I congratulate you on that awhile ago?
By the way I'm running with vision disabled in this sim, which also improves the speed a lot.
The internet is corrupt and controlled by criminally minded people.

Offline The_Duck

  • Bot Neophyte
  • *
  • Posts: 29
    • View Profile
Perf changes in 2.43.1f
« Reply #6 on: April 02, 2008, 08:56:58 PM »
I was running a sim in 2.43.1e at ~4.5 cycles/sec. Saving and switching to 2.43.1f gave an initial speed of ~7 cycles/sec, which has slowed over a period of ~10 minutes to 3.3 cycles/sec. Saving that, closing DB, and opening again in 2.43.1f gave an initial speed of 5.8 cycles/sec which has slowed to 3.4 cycles/sec. Saving and switching back to 2.43.1e gives a consistent 4.8 cycles/sec. So while there is an initial speed boost for -f, it quickly becomes slower than -e.

Are you expecting -f to be faster or slower than -e?
« Last Edit: April 02, 2008, 08:57:54 PM by The_Duck »

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Perf changes in 2.43.1f
« Reply #7 on: April 02, 2008, 09:05:06 PM »
Quote from: The_Duck
Are you expecting -f to be faster or slower than -e?
It should be considerably faster for larger fields and somewhat faster for smaller fields.  Under no conditions should it be slower.  Would your mind posting your sim?
Many beers....

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Perf changes in 2.43.1f
« Reply #8 on: April 02, 2008, 09:10:42 PM »
Quote from: Testlund
By the way I'm running with vision disabled in this sim, which also improves the speed a lot.
You won't notice the perf improvement if your running blind bots.  It bascially sped up vision a ton.
Many beers....

Offline The_Duck

  • Bot Neophyte
  • *
  • Posts: 29
    • View Profile
Perf changes in 2.43.1f
« Reply #9 on: April 03, 2008, 11:42:27 AM »
Quote from: EricL
It should be considerably faster for larger fields and somewhat faster for smaller fields.  Under no conditions should it be slower.  Would your mind posting your sim?

Here's the sim. I just tried switching from -e to -f again; after maybe 10 minutes -f was running half as fast as -e.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Perf changes in 2.43.1f
« Reply #10 on: April 03, 2008, 12:21:22 PM »
I think I've found the issue.   Has to do with reclaiming memory when bots are removed from buckets.  In short, I was reDimming the bucket's bot list every time a bot leaves a bucket.  I'm testing the new routine now.  In theory, that high initial speed should not fall off.
Many beers....

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Perf changes in 2.43.1f
« Reply #11 on: April 03, 2008, 02:37:07 PM »
Okay, I'm now getting a very consistant 25 cycles/sec  +/- 5 cycles/sec (video disabled) over periods of hours running your sim on 2.43.1g.  I've made some changes to how memory is reclaimed as bots move from bucket to bucket, which addressed the perf fall off in 2.43.1f and I have also enabled the bucket code for bot-bot collisions in 2.43.1g.  This later change should provide another incremental performance boost beyond what was done for 2.43.1f (even for blind bots) and like the first change, should be more pronouced the larger and sparser the sim.

One important implication of this new internal algorithm is that it results in a fairly dramatic change to the shape of the performance curve as a function of bot population.  That is, the performance impact from adding additional bots to a sim should move closer to being linear.  Once I get this turned on for all the applicable areas, the incrimental perf hit of popualtion spikes and simply running larger, more populated sims in general should be much more tolerable.
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Perf changes in 2.43.1f
« Reply #12 on: April 05, 2008, 06:29:24 PM »
Quote from: EricL
This later change should provide another incremental performance boost beyond what was done for 2.43.1f (even for blind bots)...

Confirmz!  

My sim in 2.43.1f: 13.1 cycles/sec.

My sim in 2.43.1g: 20.9 cycles/sec.

Now one can start an evosim with a lot more bots which should give a greater chance for something interesting to evolve within a shorter timespan, and larger field sizes won't look so barren. Great work!  
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Perf changes in 2.43.1f
« Reply #13 on: April 05, 2008, 07:36:55 PM »
I'd be interested to know where the bottleneck is now.  I'd appreciate posting any profiling results when you have a chance.

Offline The_Duck

  • Bot Neophyte
  • *
  • Posts: 29
    • View Profile
Perf changes in 2.43.1f
« Reply #14 on: April 06, 2008, 03:05:27 AM »
Very impressive speed improvement: I've gone from 10-15 cycles/sec in 2.43.1e to 40-45 cycles/sec with 2.43.1g!
« Last Edit: April 06, 2008, 03:08:03 AM by The_Duck »