Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-14577

Stop using sizeof() inside for() loop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1.9-RC1, 3.2.0-RC1
    • 3.1.8
    • None
    • None

      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.

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

              Created:
              Updated:
              Resolved: