This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changes between Initial Version and Version 1 of Ticket #2179, comment 30


Ignore:
Timestamp:
10/19/14 22:51:28 (10 years ago)
Author:
Radagast

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2179, comment 30

    initial v1  
    1 Keep it up. Do you think using Sets may improve performance further as Sets not allow duplicates? This way we might save the cost of indexOf() === -1 which is expensive as it is checked within the loop in GetAllBuildableEntities() in the GuiInterface. Also === check is expensive in comparison to != check (as all bits and type have to be checked for equality while for != we can terminate once we have found one non-equal bit .. anyway, that's lowlevel, no idea if the javascript compiler optimizes this automatically .. but probably not).
     1Keep it up. Do you think using Sets may improve performance further as Sets not allow duplicates? This way we might save the cost of indexOf() === -1 which is expensive as it is checked within the double loop (=> n^2) in GetAllBuildableEntities() in the GuiInterface. Also === check is expensive in comparison to != check (as all bits and type have to be checked for equality while for != we can terminate once we have found one non-equal bit .. anyway, that's lowlevel, no idea if the javascript compiler optimizes this automatically .. but probably not).