Ticket #6919 (closed enhancement: fixed)
[patch]performance tweaks for dojo/_base/array.js
| Reported by: | schallm | Owned by: | dylan |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | Core | Version: | 1.1.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I looked though the style guide for "for" loops and could not find the suggested way. I looked at the _base/array.js for the best way. There were several differences within this file for each "for" statement. I searched google a little to find the "best" way. Looks like caching the length is superior and that ++i is better than i++. Premature optimization is bad, but I would think anything in _base needs to be as fast as possible. I'll include a patch for _base/array.js.
schallm
Attachments
Change History
Note: See
TracTickets for help on using
tickets.