Use prototype based Recorder for performance boost.#12
Use prototype based Recorder for performance boost.#12twada merged 4 commits intopower-assert-js:masterfrom
Conversation
lib/babel-assertion-visitor.js
Outdated
There was a problem hiding this comment.
Why can't this just be source: args? I did it this way to mimic what you had before, but I am not entirely sure why it's necessary to create a safe copy of args here.
There was a problem hiding this comment.
Yeah it's redundant. source: args would be better. Renaming args would be more better :)
There was a problem hiding this comment.
OK. Working on this now. It takes a while to update all the "expected" fixtures
|
@twada - The An alternate solution (should you ever want to add code coverage to this project), would be to move the helper to it's own file and just use |
|
@jamestalmage Nice optimization!
|
|
|
|
@twada - should be good to go |
|
@jamestalmage Looks good to me. I'm going to merge and cut a new release. |
Use prototype based Recorder for performance boost.
|
@jamestalmage babel-plugin-espower 2.1.1 is out. Thanks! |
The current method of creating a PowerAssertRecorder prevents some optimizations by the V8 compiler.
Specifically, it creates many extra closure contexts, and prevents the use of hidden classes.
My test suite was seeing roughly a 5% boost.