Skip to main content

Bug Tracker

Side navigation

#8814 closed enhancement (fixed)

Opened April 08, 2011 12:55AM UTC

Closed April 10, 2011 06:32PM UTC

Unnecessary code in inArray

Reported by: timmywil Owned by: timmywil
Priority: low Milestone: 1.next
Component: core Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:
Description

I was looking through core.js and noticed the redefinition of inArray using indexOf if it exists. Since this overrides the function, we don't need to check for indexOf in the fallback inArray definition.

pull request

Attachments (0)
Change History (3)

Changed April 08, 2011 12:56AM UTC by timmywil comment:1

component: unfiledcore
owner: → timmywil
priority: undecidedlow
status: newassigned

Changed April 08, 2011 01:51AM UTC by rwaldron comment:2

_comment0: Building on timmywil's commit, I reduced the overhead further, with negligible performance loss: \ \ https://github.com/jquery/jquery/pull/308 \ \ http://jsperf.com/init-time-vs-on-call \ \ 1302228689633263

Building on timmywil's commit, I reduced the codesize further, with negligible performance loss:

https://github.com/jquery/jquery/pull/308

http://jsperf.com/init-time-vs-on-call

Changed April 10, 2011 06:32PM UTC by Rick Waldron comment:3

resolution: → fixed
status: assignedclosed

Fixes #8814. Clean up inArray.

Changeset: 8c40c00fac2f30fa0804ae8097642636f9718ddd