Opened 13 years ago
Closed 12 years ago
#5898 closed enhancement (wontfix)
Performance Improvement for :odd/:even
Reported by: | LX | Owned by: | snover |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | selector | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I benchmarked the modulo operator against the binary operations: binary operations are 3 - 10 times faster, depending on the browser. So instead of "return i % 2 === 0;" and "return i % 2 === 1;", one could use "return i & 1 === 1" and "return i & 1 === 0;" with more speed.
Change History (3)
comment:1 Changed 12 years ago by
Milestone: | 1.4.1 |
---|---|
Priority: | minor → low |
Status: | new → open |
Version: | 1.4 → 1.4.4 |
comment:2 Changed 12 years ago by
Owner: | changed from john to snover |
---|---|
Status: | open → assigned |
Note: See
TracTickets for help on using
tickets.
pull request and jsPerf test case.