Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

perf(copy): use different arrays for different types #12065

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lgalfaso
Copy link
Contributor

@lgalfaso lgalfaso commented Jun 9, 2015

Use different arrays for different types.
Remove forEach to clean the destination object.

Use different arrays for different types.
Remove forEach to clean the destination object.
@lgalfaso
Copy link
Contributor Author

lgalfaso commented Jun 9, 2015

using the same test at f7bf118, there is a 10% improvement

@jbedard
Copy link
Collaborator

jbedard commented Jun 9, 2015

I haven't created a PR yet but see ec8d488. It reduces the copy time by 30-60% while also splitting the method up similar to this.

I didn't think of separate arrays though. But I'm not sure if it's worth the extra code and duplication imo. I'd still vote for using Map, but that had its own issues...

@lgalfaso
Copy link
Contributor Author

lgalfaso commented Jun 9, 2015

The use of Map would be ideal, but is not present in all the supported browsers and adding a polyfill would add a lot of code.

@petebacondarwin petebacondarwin added this to the 1.4.x milestone Nov 1, 2015
@Narretz Narretz modified the milestones: Backlog, 1.4.x Jan 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants