Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ES6 and allow V8 to optimize mergeOptions #3743

Merged
merged 1 commit into from
Nov 4, 2016

Conversation

misteroneill
Copy link
Member

Description

The current implementation causes the mergeOptions function to be de-optimized. This change improves readability by switching to ES6 syntax and it results in a roughly 75% improvement in the performance of this function by transpiling to a for loop instead of slice.call.

Requirements Checklist

  • Feature implemented / Bug fixed
  • Reviewed by Two Core Contributors

The current implementation causes the `mergeOptions` function to be
de-optimized. This change improves readability by switching to ES6
syntax AND it results in a roughly 75% improvement in the performance
of this function by transpiling to a `for` loop instead of
`slice.call`.
@misteroneill misteroneill added the patch This PR can be added to a patch release. label Nov 4, 2016
@brandonocasey
Copy link
Contributor

LGTM

@gkatsev gkatsev added this to the 5.13 milestone Nov 4, 2016
@gkatsev gkatsev merged commit 5f42130 into videojs:master Nov 4, 2016
@misteroneill misteroneill deleted the optimize-merge-options branch November 7, 2016 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch This PR can be added to a patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants