URL:
  <http://gna.org/patch/?4899>

                 Summary: Remove is_native_terrain() function
                 Project: Freeciv
            Submitted by: persia
            Submitted on: Fri 04 Jul 2014 09:24:00 AM JST
                Category: general
                Priority: 5 - Normal
                  Status: Ready For Test
                 Privacy: Public
             Assigned to: persia
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.6.0

    _______________________________________________________

Details:

    Running gprof on an autogame, is_native_to_class() had 6581365554 calls
take 73.47 seconds, but the wrapper function is_native_terrain only managed 52
calls in 7.03 seconds.  The attached patch drops is_native_terrain(), and uses
is_native_to_class() instead in the two places in the codebase that previously
used is_native_terrain().  While saving 7 seconds off the run of an autogame
isn't that much, having fewer functions also makes the code less confusing and
the symbol tables smaller.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 04 Jul 2014 09:24:00 AM JST  Name: remove-is_native_terrain.patch 
Size: 3kB   By: persia

<http://gna.org/patch/download.php?file_id=21262>

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to