Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14577

Stop using sizeof() inside for() loop

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.1.8
    • 3.1.9-RC1, 3.2.0-RC1
    • None
    • None

    Description

      In several places, we calculate the size of the for loop inside the for() declaration. This adds a rather big overhead as the loop size is calculated on every iteration. Especially in larger loops, this will noticeably increase the amount of time spent in for loops. Additionally, this should be actively discouraged in the coding guidelines.

      Attachments

        Activity

          People

            Marc Marc
            Marc Marc
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: