Skip to content

range for loops #52

Open
Open

Description

@yakra

It seems that in many cases range for loops are less efficient than traditional for loops using an iterator.
Search for & investigate cases where this conversion can be made.
Start with Performing data checks...

  • Idea: Will converting for (foo bar : baz) to for (foo &bar : baz) yield similar improvements?
  • If so: Could it also improve some loops currently implemented with iterators?

Activity

  1. yakra commented on Apr 28, 2019

    @yakra
    OwnerAuthor

    userlog.cpp clean as of fb94c99

  2. yakra commented on Dec 12, 2019

    @yakra
    OwnerAuthor
  3. yakra commented on May 2, 2020

    @yakra
    OwnerAuthor
    • TravelerList::active_only_miles()
    • TravelerList::active_preview_miles()
    • TravelerList::system_region_miles(HighwaySystem *h)

    • country_or_continent_by_code

    • not range, but consider tidying up lower & upper
      No, that just adds to the commit history for no real gain.

    • concurrent travelers sanity check or whatever it's called, even though commented out
  4. yakra commented on May 14, 2020

    @yakra
    OwnerAuthor

    Good to close, save for one final question:

    Ranges in a container of pointers were not changed. Could converting this have any effect on the innermost loops that are repeated loads of times?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions