mulander / evolutionchamber

Automatically exported from code.google.com/p/evolutionchamber
0 stars 0 forks source link

Changed ActionList from HashMap to Priority Queue #163

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Changed ActionList from HashMap to Priority Queue
Replaced iterators with while loops

Noticed a 30% increase in games per second.

Original issue reported on code.google.com by nafets...@gmail.com on 26 Nov 2010 at 9:21

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by netpr...@gmail.com on 26 Nov 2010 at 9:53

GoogleCodeExporter commented 8 years ago
Applied the patch. Thanks!

Fixed in r140

Original comment by netpr...@gmail.com on 26 Nov 2010 at 10:04

GoogleCodeExporter commented 8 years ago

Original comment by netpr...@gmail.com on 26 Nov 2010 at 10:05

GoogleCodeExporter commented 8 years ago
I did some speed tests to look at how much this patch improved performance.  
Using the two different kinds of tests that netprobe used in  issue 158  (one 
with and one without waypoints), I calculated the average games played per 
second with two different versions of the application (before and after the 
patch).  The two tests are described below.

Before running each test, I deleted the "etc" directory and restarted Evolution 
Chamber to avoid caching or memory issues that might effect performance.  Each 
test used 1 processor and ran for 20 seconds.  The average games played per 
second was calculated using code that I added to the application.  I didn't 
check the resulting build order for accuracy...I only focused on the speed.

Test 1:
Final: 7 Mutas, +1 Flyer Attack

Test 2:
WP0: 6 Zerglings
WP1: 6 Roaches
WP2: 2 Hydralisks
WP3: 3 Overseers
Final: 7 Mutalisks, +1 Flyer Attack

==========

Before patch (r139)
Test 1: 2761.1673069539415
Test 2: 3621.6319059771017

After patch:
Test 1: 3205.304248543362 (~24% increase)
Test 2: 3839.810705519728 (~6% increase)

Original comment by mike.angstadt on 29 Nov 2010 at 11:24