Ticket #1636 (closed feature: fixed)
cache array length where possible
| Reported by: | tschaub | Owned by: | euzuro |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.7 Release |
| Component: | general | Version: | 2.6 |
| Keywords: | Cc: | ||
| State: | Complete |
Description
This patch could be far bigger, and I'm happy to change this elsewhere if others think it a good thing.
For long (and non-sparsely populated) arrays, a fast loop that is still readable is one that caches the array length.
Nice stats to for cases with long arrays from here: http://blogs.sun.com/greimer/resource/loop-test.html
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

