URL: <http://gna.org/patch/?6550>
Summary: Write base_get_direction_for_step() macros open, discard unnecessary parts Project: Freeciv Submitted by: cazfi Submitted on: Thu 05 Nov 2015 08:50:05 AM EET Category: general Priority: 5 - Normal Status: Ready For Test Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.5.2, 2.6.0, 3.0.0 _______________________________________________________ Details: As seen in bug #24018 profiling, base_get_direction_for_step() is performance critical function (maybe even more than the profile reveals - some users inline it). Attached patch replaces use of generic iterator macro with base_get_direction_for_step() specific iteration that does nothing extra - we don't want to convert coordinate differences all the way to valid tiles to compare, we can compare the coordinate difference directly. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Thu 05 Nov 2015 08:50:06 AM EET Name: MinimalBaseGetDirection-S2_5.patch Size: 2kB By: cazfi <http://gna.org/patch/download.php?file_id=25621> ------------------------------------------------------- Date: Thu 05 Nov 2015 08:50:05 AM EET Name: MinimalBaseGetDirection.patch Size: 2kB By: cazfi <http://gna.org/patch/download.php?file_id=25620> _______________________________________________________ Reply to this item at: <http://gna.org/patch/?6550> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev