[Freeciv-tickets] [freeciv] #44611: Optimize some heavy MAX() and MIN() uses

Back to archive index
OSDN Ticket System norep****@osdn*****
Sun Jun 26 20:22:54 JST 2022


#44611: Optimize some heavy MAX() and MIN() uses

  Open Date: 2022-05-15 09:02
Last Update: 2022-06-26 14:22

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/44611
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44611

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-06-26 14:22 Updated by: cazfi
 * Owner Update from (None) to cazfi
 * Resolution Update from None to Accepted

Comment:

For master I went through all MAX() and MIN() uses for candidates to change. For older branches I just ported those same changes, not checking if there would be additional candidates in them - except for porting gtk3.22-client changes to older gtk-clients supported only in older branches.

---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: cazfi
          Type: Patches
        Status: Open [Owner assigned]
      Priority: 5 - Medium
     MileStone: 3.0.3
     Component: General
      Severity: 5 - Medium
    Resolution: Accepted
---------------------------------------------------------------------

Ticket details:

We have some MAX() and MIN() uses where one of the parameters is relatively heavy to evaluate AND such that the compiler cannot optimize away the need to do the full evaluation twice (a function call of which compiler does not know that it will return the same value both times, and has no side-effects)
Move such heavy evaluations outside the macros, to do them only once.

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/44611
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44611



More information about the Freeciv-tickets mailing list
Back to archive index