Skip to main content

Bug Tracker

Side navigation

#14333 closed bug (notabug)

Opened September 04, 2013 06:59PM UTC

Closed September 05, 2013 12:16AM UTC

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

Attachments (0)
Change History (4)

Changed September 04, 2013 07:02PM UTC by dmethvin comment:1

Even Android 2.3?

Changed September 04, 2013 07:23PM UTC by timmywil comment:2

component: unfiledcore
priority: undecidedlow
status: newopen

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.

Changed September 04, 2013 08:20PM UTC by ameyms comment:3

_comment0: 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 \ 1378326107661206

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.

Changed September 05, 2013 12:16AM UTC by dmethvin comment:4

resolution: → notabug
status: openclosed