-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Improve benchmarks accuracy #148
Conversation
"babel-plugin-transform-minify-booleans": "^6.8.0", | ||
"babel-plugin-transform-property-literals": "^6.8.0", | ||
"babel-plugin-transform-simplify-comparison-operators": "^6.8.0", | ||
"babel-plugin-transform-undefined-to-void": "^6.8.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we can avoid this? Needed for benchmarks to be able to modify plugin options (such as simplify).
@boopathi now that preset options are in, I guess let me change PR to use that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline
presets: [ | ||
[require("../packages/babel-preset-babili"), { | ||
simplify: { | ||
multiPass: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@boopathi this doesn't seem to show any difference in any of the files I'm testing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no multipass option implemented in simplify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You implemented it here - in this commit - 827a835#diff-05684bffcab704dd5d3842adbf921357 and your latest changes don't seem to have this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I'm an idiot, was thinking that we already added it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still doesn't seem to work though. Am I missing something else? Should I change anything in options-manager?
if (!multiPass) { | ||
return; | ||
} | ||
|
||
earlyReturnTransform(path); | ||
|
||
if (!path.node[shouldRevisit]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't multipass
affect this ?
It throws an error for me - Container is falsy
. I suppose this happens when calling path.replaceWith
on the path whose node is modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried the script from the readme -
./scripts/benchmark.js react@0.14.3 react/dist/react.js
Also, the run time metric looks inverted ?
|
@boopathi I just remembered that you removed |
Ah. yeah. #282 |
How about I remove multiPass for now, and merge the rest? That way we can pass options through presets in a benchmark since we'll likely have them in a future. |
Cool! This means we run each benchmark 3 times .. right? |
Yep. We can also expose it via command line flag |
This changes benchmark suite to run tests multiple times and get average. It also introduces "best size" and "best speed" versions of babili.