Follow-up Comment #2, patch #2819 (project wesnoth):

If the patch can't be accepted because of the boost version that would be
disappointing.  It is a patch based on the SVN development version, which
might make it easier to bump the boost version as it only affects developers.

The patch improves ai turn time by about 5-7% on maps with many units.  The
results were consistent over three runs and I've included one pair of before
and after reports as attachments. The raw data was over 100MB.  Look for
unit_map::find in the results to see the reduction in the time spent calling
find.  Look at the overall time spent sampling to see the 6% speedup.   

Performance should be unaffected on maps with fewer units.

YMMV, so here are instructions to replicate the results.
I generated the performance data using perf and time.   I loaded a turn from
NR Showdown (615 units) and collected data from clicking End Turn until the
start of the next turn.  Here are instructions.

1. Start wesnoth and load a saved game.
./wesnoth &

2. Get the PID
ps

3. Start Profiling
/usr/bin/time -v -- perf record -g --freq=10000 --pid=<PID>

4. Hit End Turn
Ctrl - Space

5. Stop the profiling when the turn ends
Ctrl -C

(file #13621, file #13622)
    _______________________________________________________

Additional Item Attachment:

File name: perf_report_pre_unit_map_change Size:39 KB
File name: perf_report_post_unit_map_change Size:45 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?2819>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to