-
-
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
Add butternut to benchmarks #527
Conversation
Codecov Report
@@ Coverage Diff @@
## master #527 +/- ##
==========================================
+ Coverage 83.22% 83.26% +0.03%
==========================================
Files 34 34
Lines 2539 2539
Branches 908 908
==========================================
+ Hits 2113 2114 +1
+ Misses 255 254 -1
Partials 171 171
Continue to review full report at Codecov.
|
README.md
Outdated
| **closureCompiler** | 34.77kB | 72% | 11.96kB | 60% | 2.62 | 3940.01 | | ||
| **closureCompilerJs** | 65.41kB | 48% | 15.83kB | 47% | 2.96 | 1049.21 | | ||
| **babili** | 35.86kB | 71% | 12.47kB | 58% | 8.14 | 1418.56 | | ||
| **uglify** | 35.74kB | 71% | 11.97kB | 60% | 2.60 | 676.57 | |
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.
lets add uglify-es as well?
scripts/benchmark.js
Outdated
@@ -128,6 +130,9 @@ class Benchmark { | |||
const out = compile(flags); | |||
return out.compiledCode; | |||
} | |||
butternut(code) { | |||
return butternut.squash(code, { check: true }).code; |
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.
Using the check: true
option is a good idea to check that Butternut is producing valid code, but it shouldn't be used for benchmarking as it causes the output to be parsed again.
Also, Butternut generates a sourcemap by default. Since Babili and Uglify don't, we should probably disable sourcemaps for Butternut too to remove that from the equation:
-return butternut.squash(code, { check: true }).code;
+return butternut.squash(code, { sourceMap: false }).code;
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.
👍
+ Remove check:true as it re-runs + Add sourceMaps false as by default others don't generate sourcemaps, but butternut does + Update README
What is the rule for using bold text in the benchmark tables? Highlight best results? For example, in the first table for React: Closure Compiler has the best results for output size, but not for parse time and minify time. |
https://github.com/Rich-Harris/butternut
/cc @Rich-Harris