Opened 9 years ago
Closed 9 years ago
#14333 closed bug (notabug)
Use the native Array.filter method in jQuery.grep (jQuery 2.x)
Reported by: | ameyms | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | core | Version: | 2.0.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This is safe to do since jQuery 2.x only supports ES5 compliant browsers
Change History (4)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Component: | unfiled → core |
---|---|
Priority: | undecided → low |
Status: | new → open |
Yup, just checked. It seems Android 2.3 has it as well. However, it shouldn't be assumed without testing that native filter is faster than looping.
comment:3 Changed 9 years ago by
jsPerf indicates native filtering is ~17% slower than for loop based
http://jsperf.com/array-filter-vs-for-loop
I think this ticket can be closed. I have also closed the corresponding PR.
comment:4 Changed 9 years ago by
Resolution: | → notabug |
---|---|
Status: | open → closed |
Note: See
TracTickets for help on using
tickets.
Even Android 2.3?