Skip to content

Add some optimizations to often used functions#1893

Merged
etimberg merged 1 commit intochartjs:v2.0-devfrom
mathiask88:updateOptimizations
Jan 12, 2016
Merged

Add some optimizations to often used functions#1893
etimberg merged 1 commit intochartjs:v2.0-devfrom
mathiask88:updateOptimizations

Conversation

@mathiask88
Copy link
Contributor

This PR addresses some optimizations:

  • Using call instead of apply is ~80% faster and the flexibility of dynamic additional arguments is currently not used

  • Using slice on the arguments object prevents V8 from optimising. Replaced with much faster for.. loop

    image

    (helpers.configMerge argument slice was left as is, because it is not called very often)

  • Replaced slow for..in with for.. loop

/cc #1882

@etimberg etimberg added this to the Version 2.0 milestone Jan 12, 2016
etimberg added a commit that referenced this pull request Jan 12, 2016
Add some optimizations to often used functions
@etimberg etimberg merged commit 7735371 into chartjs:v2.0-dev Jan 12, 2016
@mathiask88 mathiask88 deleted the updateOptimizations branch February 7, 2016 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants