Skip to content

Commit

Permalink
fix(es/minifier): Don't skip expressions with side effects from seq i…
Browse files Browse the repository at this point in the history
…nliner (#7007)
  • Loading branch information
Austaras authored Mar 4, 2023
1 parent 0ade738 commit cfeb088
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let b;
for(let i = 0; i < 2; ++i)console.log(0, b = 0 === i ? 1 : 2);
for(let i = 0; i < 2; ++i)b = 0 === i ? 1 : 2, console.log(0, b);
let c = 1, d;
while(c--);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let b, c, d;
for(let i = 0; i < 2; ++i)console.log(0, b = 0 === i ? 1 : 2);
for(let i = 0; i < 2; ++i)b = 0 === i ? 1 : 2, console.log(0, b);
c = 1;
while(c--);
18 changes: 13 additions & 5 deletions crates/swc_ecma_minifier/src/compress/optimize/sequences.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,11 +1068,15 @@ where

match e {
Expr::Ident(e) => {
if e.span.ctxt == self.expr_ctx.unresolved_ctxt
&& !is_global_var_with_pure_property_access(&e.sym)
{
log_abort!("Undeclared");
return false;
if e.span.ctxt == self.expr_ctx.unresolved_ctxt {
return if self.options.pristine_globals
&& is_global_var_with_pure_property_access(&e.sym)
{
true
} else {
log_abort!("Undeclared");
return false;
};
}

if let Some(a) = a {
Expand Down Expand Up @@ -1185,6 +1189,10 @@ where
}

Expr::Member(MemberExpr { obj, prop, .. }) => {
if !self.is_skippable_for_seq(a, obj) {
return false;
}

if !self.should_preserve_property_access(
obj,
PropertyAccessOpts {
Expand Down
4 changes: 2 additions & 2 deletions crates/swc_ecma_minifier/tests/benches-full/jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -1834,8 +1834,8 @@
return computeStyleTests(), scrollboxSizeVal;
},
reliableTrDimensions: function() {
var table, tr, trChild, trStyle;
return null == reliableTrDimensionsVal && (table = document.createElement("table"), tr = document.createElement("tr"), trChild = document.createElement("div"), table.style.cssText = "position:absolute;left:-11111px", tr.style.height = "1px", trChild.style.height = "9px", documentElement.appendChild(table).appendChild(tr).appendChild(trChild), trStyle = window1.getComputedStyle(tr), reliableTrDimensionsVal = parseInt(trStyle.height) > 3, documentElement.removeChild(table)), reliableTrDimensionsVal;
var table, tr, trChild;
return null == reliableTrDimensionsVal && (table = document.createElement("table"), tr = document.createElement("tr"), trChild = document.createElement("div"), table.style.cssText = "position:absolute;left:-11111px", tr.style.height = "1px", trChild.style.height = "9px", documentElement.appendChild(table).appendChild(tr).appendChild(trChild), reliableTrDimensionsVal = parseInt(window1.getComputedStyle(tr).height) > 3, documentElement.removeChild(table)), reliableTrDimensionsVal;
}
}));
}();
Expand Down
4 changes: 2 additions & 2 deletions crates/swc_ecma_minifier/tests/benches-full/terser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1190,11 +1190,11 @@
}
function switch_body_() {
expect("{");
for(var tmp, a = [], cur = null, branch = null; !is("punc", "}");)is("eof") && unexpected(), is("keyword", "case") ? (branch && (branch.end = prev()), cur = [], a.push(branch = new AST_Case({
for(var tmp, a = [], cur = null, branch = null; !is("punc", "}");)is("eof") && unexpected(), is("keyword", "case") ? (branch && (branch.end = prev()), cur = [], branch = new AST_Case({
start: (tmp = S.token, next(), tmp),
expression: expression(!0),
body: cur
})), expect(":")) : is("keyword", "default") ? (branch && (branch.end = prev()), cur = [], a.push(branch = new AST_Default({
}), a.push(branch), expect(":")) : is("keyword", "default") ? (branch && (branch.end = prev()), cur = [], a.push(branch = new AST_Default({
start: (tmp = S.token, next(), expect(":"), tmp),
body: cur
}))) : (cur || unexpected(), cur.push(statement()));
Expand Down
8 changes: 4 additions & 4 deletions crates/swc_ecma_minifier/tests/benches-full/victory.js
Original file line number Diff line number Diff line change
Expand Up @@ -9640,19 +9640,19 @@
{
key: "render",
value: function() {
var arr, animationWhitelist = VictoryAxis.animationWhitelist, props = victory_core__WEBPACK_IMPORTED_MODULE_4__.Axis.modifyProps(this.props, fallbackProps);
var animationWhitelist = VictoryAxis.animationWhitelist, props = victory_core__WEBPACK_IMPORTED_MODULE_4__.Axis.modifyProps(this.props, fallbackProps);
if (this.shouldAnimate()) return this.animateComponent(props, animationWhitelist);
var gridAndTicks = this.renderGridAndTicks(props), children = [
var gridAndTicks = this.renderGridAndTicks(props), modifiedGridAndTicks = props.fixLabelOverlap ? this.fixLabelOverlap(gridAndTicks, props) : gridAndTicks, children = [
this.renderLine(props),
this.renderLabel(props)
].concat(function(arr) {
if (Array.isArray(arr)) {
for(var i = 0, arr2 = Array(arr.length); i < arr.length; i++)arr2[i] = arr[i];
return arr2;
}
}(arr = props.fixLabelOverlap ? this.fixLabelOverlap(gridAndTicks, props) : gridAndTicks) || function(iter) {
}(modifiedGridAndTicks) || function(iter) {
if (Symbol.iterator in Object(iter) || "[object Arguments]" === Object.prototype.toString.call(iter)) return Array.from(iter);
}(arr) || function() {
}(modifiedGridAndTicks) || function() {
throw TypeError("Invalid attempt to spread non-iterable instance");
}());
return props.standalone ? this.renderContainer(props.containerComponent, children) : react__WEBPACK_IMPORTED_MODULE_3___default.a.cloneElement(props.groupComponent, {}, children);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ let proto = {
setter_effect = 'PASS';
}
};
({
let obj2 = {
__proto__: proto
}).foo;
};
({
__proto__: proto
}).bar = 0;
}).foo;
obj2.bar = 0;
assert.strictEqual(getter_effect, 'PASS');
assert.strictEqual(setter_effect, 'PASS');
16 changes: 16 additions & 0 deletions crates/swc_ecma_minifier/tests/fixture/issues/7004/input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
function getDescription(option, parentGroup) {
return [
parentGroup && parentGroup.label,
option.__labelPrefix,
]
.concat(option.tags)
}

function printDescription() {
const option = {__labelPrefix: 'test', tags: []};
const parent = null
const desc = getDescription(option, parent);
console.log(desc);
}

printDescription();
11 changes: 11 additions & 0 deletions crates/swc_ecma_minifier/tests/fixture/issues/7004/output.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
!function() {
var option;
const desc = [
null,
(option = {
__labelPrefix: 'test',
tags: []
}).__labelPrefix
].concat(option.tags);
console.log(desc);
}();
Original file line number Diff line number Diff line change
Expand Up @@ -2639,7 +2639,7 @@
if (!e) return [];
for(var n = rH(e, t, r), i = [
n[0]
], o = n[1]; null !== o;)i.push((n = rH(o, t + i.length, r))[0]), o = n[1];
], o = n[1]; null !== o;)n = rH(o, t + i.length, r), i.push(n[0]), o = n[1];
return i;
}, rY = function(e) {
return function(t) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6747,7 +6747,7 @@
return value > this.max ? this.max : value < this.min ? this.min : value;
}, NumericTextBox.prototype.roundNumber = function(value, precision) {
var result = value, decimals = precision || 0, result1 = result.toString().split('e'), result2 = (result = Math.round(Number(result1[0] + 'e' + (result1[1] ? Number(result1[1]) + decimals : decimals)))).toString().split('e');
return result = Number(result2[0] + 'e' + (result2[1] ? Number(result2[1]) - decimals : -decimals)), Number(result.toFixed(decimals));
return Number((result = Number(result2[0] + 'e' + (result2[1] ? Number(result2[1]) - decimals : -decimals))).toFixed(decimals));
}, NumericTextBox.prototype.cancelEvent = function(event) {
return event.preventDefault(), !1;
}, NumericTextBox.prototype.keyPressHandler = function(event) {
Expand Down

1 comment on commit cfeb088

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: cfeb088 Previous: a6471f3 Ratio
es/full/bugs-1 297004 ns/iter (± 14633) 288149 ns/iter (± 19912) 1.03
es/full/minify/libraries/antd 1621449718 ns/iter (± 16790525) 1566143784 ns/iter (± 56229848) 1.04
es/full/minify/libraries/d3 298072672 ns/iter (± 7541234) 279974187 ns/iter (± 5939686) 1.06
es/full/minify/libraries/echarts 1245625604 ns/iter (± 14067658) 1200878193 ns/iter (± 55443174) 1.04
es/full/minify/libraries/jquery 92075913 ns/iter (± 936744) 90143429 ns/iter (± 1202903) 1.02
es/full/minify/libraries/lodash 107276159 ns/iter (± 1127801) 106317600 ns/iter (± 1360588) 1.01
es/full/minify/libraries/moment 53014744 ns/iter (± 439330) 52891116 ns/iter (± 1283305) 1.00
es/full/minify/libraries/react 19273217 ns/iter (± 76295) 19566524 ns/iter (± 81510) 0.99
es/full/minify/libraries/terser 249526811 ns/iter (± 1442869) 238193282 ns/iter (± 4918211) 1.05
es/full/minify/libraries/three 452685622 ns/iter (± 5849261) 418841077 ns/iter (± 4765762) 1.08
es/full/minify/libraries/typescript 3055418756 ns/iter (± 13861675) 2919727885 ns/iter (± 24747951) 1.05
es/full/minify/libraries/victory 691857288 ns/iter (± 10111204) 642147472 ns/iter (± 15285956) 1.08
es/full/minify/libraries/vue 131560692 ns/iter (± 1046275) 127853402 ns/iter (± 2088805) 1.03
es/full/codegen/es3 25975 ns/iter (± 37) 26178 ns/iter (± 218) 0.99
es/full/codegen/es5 25949 ns/iter (± 64) 26570 ns/iter (± 98) 0.98
es/full/codegen/es2015 25944 ns/iter (± 45) 25969 ns/iter (± 251) 1.00
es/full/codegen/es2016 25948 ns/iter (± 55) 25967 ns/iter (± 130) 1.00
es/full/codegen/es2017 25971 ns/iter (± 109) 26651 ns/iter (± 127) 0.97
es/full/codegen/es2018 25977 ns/iter (± 53) 26519 ns/iter (± 148) 0.98
es/full/codegen/es2019 25958 ns/iter (± 80) 25809 ns/iter (± 189) 1.01
es/full/codegen/es2020 26002 ns/iter (± 78) 26118 ns/iter (± 456) 1.00
es/full/all/es3 172424592 ns/iter (± 3333277) 167853561 ns/iter (± 5196484) 1.03
es/full/all/es5 162826240 ns/iter (± 2590371) 165734811 ns/iter (± 4265286) 0.98
es/full/all/es2015 126308436 ns/iter (± 1824295) 127785907 ns/iter (± 2606320) 0.99
es/full/all/es2016 124775790 ns/iter (± 1013216) 128355959 ns/iter (± 1405726) 0.97
es/full/all/es2017 122778403 ns/iter (± 1093646) 126514287 ns/iter (± 1664839) 0.97
es/full/all/es2018 120385870 ns/iter (± 1287599) 120899520 ns/iter (± 1093580) 1.00
es/full/all/es2019 119719105 ns/iter (± 900315) 120288399 ns/iter (± 1433846) 1.00
es/full/all/es2020 115018528 ns/iter (± 679562) 116115603 ns/iter (± 722958) 0.99
es/full/parser 539328 ns/iter (± 8278) 533568 ns/iter (± 9406) 1.01
es/full/base/fixer 22006 ns/iter (± 34) 21680 ns/iter (± 204) 1.02
es/full/base/resolver_and_hygiene 81676 ns/iter (± 181) 80174 ns/iter (± 814) 1.02
serialization of ast node 124 ns/iter (± 0) 124 ns/iter (± 0) 1
serialization of serde 124 ns/iter (± 0) 124 ns/iter (± 0) 1
css/minify/libraries/bootstrap 27895299 ns/iter (± 91308) 27806657 ns/iter (± 187218) 1.00
css/visitor/compare/clone 2081020 ns/iter (± 17839) 2033153 ns/iter (± 16456) 1.02
css/visitor/compare/visit_mut_span 2255440 ns/iter (± 8504) 2192126 ns/iter (± 25266) 1.03
css/visitor/compare/visit_mut_span_panic 2309974 ns/iter (± 9204) 2256504 ns/iter (± 50497) 1.02
css/visitor/compare/fold_span 3026976 ns/iter (± 29630) 2943072 ns/iter (± 14083) 1.03
css/visitor/compare/fold_span_panic 3175010 ns/iter (± 22952) 3077043 ns/iter (± 36819) 1.03
css/lexer/bootstrap_5_1_3 5245682 ns/iter (± 11341) 5080349 ns/iter (± 60035) 1.03
css/lexer/foundation_6_7_4 4430206 ns/iter (± 8451) 4392211 ns/iter (± 73145) 1.01
css/lexer/tailwind_3_1_1 837877 ns/iter (± 925) 805892 ns/iter (± 9451) 1.04
css/parser/bootstrap_5_1_3 21612906 ns/iter (± 83553) 20788313 ns/iter (± 284854) 1.04
css/parser/foundation_6_7_4 17297679 ns/iter (± 52726) 16591498 ns/iter (± 208247) 1.04
css/parser/tailwind_3_1_1 3315882 ns/iter (± 6396) 3229249 ns/iter (± 35776) 1.03
es/codegen/colors 331478 ns/iter (± 186139) 332912 ns/iter (± 188220) 1.00
es/codegen/large 1171948 ns/iter (± 607000) 1240587 ns/iter (± 671704) 0.94
es/codegen/with-parser/colors 47829 ns/iter (± 293) 46717 ns/iter (± 591) 1.02
es/codegen/with-parser/large 524748 ns/iter (± 1911) 508149 ns/iter (± 2897) 1.03
es/minify/libraries/antd 1421785752 ns/iter (± 19464286) 1341768332 ns/iter (± 52947569) 1.06
es/minify/libraries/d3 255642738 ns/iter (± 2281242) 242452728 ns/iter (± 3928445) 1.05
es/minify/libraries/echarts 1075379034 ns/iter (± 9150332) 982848181 ns/iter (± 59006158) 1.09
es/minify/libraries/jquery 79556274 ns/iter (± 680571) 76038780 ns/iter (± 525049) 1.05
es/minify/libraries/lodash 95537033 ns/iter (± 836220) 93065154 ns/iter (± 1483236) 1.03
es/minify/libraries/moment 46033509 ns/iter (± 302438) 45150962 ns/iter (± 632723) 1.02
es/minify/libraries/react 17162754 ns/iter (± 102709) 16895752 ns/iter (± 108904) 1.02
es/minify/libraries/terser 210822898 ns/iter (± 1364605) 202062697 ns/iter (± 6468095) 1.04
es/minify/libraries/three 371729920 ns/iter (± 4246917) 345595825 ns/iter (± 10121295) 1.08
es/minify/libraries/typescript 2599893801 ns/iter (± 8562865) 2542202920 ns/iter (± 24477172) 1.02
es/minify/libraries/victory 574021545 ns/iter (± 5442896) 532321984 ns/iter (± 16597968) 1.08
es/minify/libraries/vue 116198616 ns/iter (± 702600) 114696698 ns/iter (± 1159248) 1.01
es/visitor/compare/clone 2366250 ns/iter (± 20242) 2377796 ns/iter (± 15111) 1.00
es/visitor/compare/visit_mut_span 2788776 ns/iter (± 18195) 2752595 ns/iter (± 26085) 1.01
es/visitor/compare/visit_mut_span_panic 2795639 ns/iter (± 5864) 2769032 ns/iter (± 28562) 1.01
es/visitor/compare/fold_span 3875519 ns/iter (± 11999) 3841429 ns/iter (± 35793) 1.01
es/visitor/compare/fold_span_panic 4040896 ns/iter (± 17299) 3975970 ns/iter (± 50823) 1.02
es/lexer/colors 16224 ns/iter (± 12) 15732 ns/iter (± 86) 1.03
es/lexer/angular 7834095 ns/iter (± 8824) 7616313 ns/iter (± 97960) 1.03
es/lexer/backbone 1007361 ns/iter (± 780) 983810 ns/iter (± 15150) 1.02
es/lexer/jquery 5591836 ns/iter (± 7993) 5449545 ns/iter (± 24875) 1.03
es/lexer/jquery mobile 8581925 ns/iter (± 21323) 8417192 ns/iter (± 129126) 1.02
es/lexer/mootools 4417473 ns/iter (± 6141) 4321298 ns/iter (± 51102) 1.02
es/lexer/underscore 839112 ns/iter (± 1715) 828525 ns/iter (± 3466) 1.01
es/lexer/three 26159580 ns/iter (± 44547) 25629282 ns/iter (± 229766) 1.02
es/lexer/yui 4816577 ns/iter (± 11175) 4697276 ns/iter (± 29894) 1.03
es/parser/colors 30369 ns/iter (± 51) 29740 ns/iter (± 255) 1.02
es/parser/angular 15866140 ns/iter (± 104234) 15276334 ns/iter (± 262334) 1.04
es/parser/backbone 2317337 ns/iter (± 15168) 2249917 ns/iter (± 12603) 1.03
es/parser/jquery 12383346 ns/iter (± 63302) 11946378 ns/iter (± 96200) 1.04
es/parser/jquery mobile 19572317 ns/iter (± 202465) 18380851 ns/iter (± 205764) 1.06
es/parser/mootools 9506587 ns/iter (± 28690) 9162712 ns/iter (± 99068) 1.04
es/parser/underscore 1953488 ns/iter (± 13037) 1894812 ns/iter (± 24524) 1.03
es/parser/three 56683804 ns/iter (± 425623) 53528465 ns/iter (± 1066019) 1.06
es/parser/yui 9553539 ns/iter (± 52496) 9341717 ns/iter (± 161886) 1.02
es/preset-env/usage/builtin_type 141210 ns/iter (± 31942) 140389 ns/iter (± 30413) 1.01
es/preset-env/usage/property 21126 ns/iter (± 107) 21129 ns/iter (± 71) 1.00
es/resolver/typescript 111443282 ns/iter (± 2499154) 112976989 ns/iter (± 2713472) 0.99
es/fixer/typescript 85021177 ns/iter (± 3731243) 85150216 ns/iter (± 2341570) 1.00
es/hygiene/typescript 181057249 ns/iter (± 1484556) 180560549 ns/iter (± 2205871) 1.00
es/resolver_with_hygiene/typescript 317835488 ns/iter (± 3188127) 309192385 ns/iter (± 2194354) 1.03
es/visitor/base-perf/module_clone 76458 ns/iter (± 1881) 75559 ns/iter (± 1463) 1.01
es/visitor/base-perf/fold_empty 86198 ns/iter (± 1533) 82826 ns/iter (± 1294) 1.04
es/visitor/base-perf/fold_noop_impl_all 85915 ns/iter (± 1116) 83722 ns/iter (± 1523) 1.03
es/visitor/base-perf/fold_noop_impl_vec 88432 ns/iter (± 2283) 83622 ns/iter (± 1285) 1.06
es/visitor/base-perf/boxing_boxed_clone 56 ns/iter (± 0) 54 ns/iter (± 0) 1.04
es/visitor/base-perf/boxing_unboxed_clone 59 ns/iter (± 0) 57 ns/iter (± 1) 1.04
es/visitor/base-perf/boxing_boxed 104 ns/iter (± 0) 102 ns/iter (± 0) 1.02
es/visitor/base-perf/boxing_unboxed 102 ns/iter (± 0) 101 ns/iter (± 0) 1.01
es/visitor/base-perf/visit_contains_this 3525 ns/iter (± 59) 3483 ns/iter (± 61) 1.01
es/base/parallel/resolver/typescript 5193336620 ns/iter (± 625489084) 5204965956 ns/iter (± 356303088) 1.00
es/base/parallel/hygiene/typescript 2143895316 ns/iter (± 25126299) 2144292217 ns/iter (± 25949047) 1.00
misc/visitors/time-complexity/time 5 100 ns/iter (± 0) 100 ns/iter (± 0) 1
misc/visitors/time-complexity/time 10 326 ns/iter (± 0) 324 ns/iter (± 4) 1.01
misc/visitors/time-complexity/time 15 658 ns/iter (± 1) 632 ns/iter (± 5) 1.04
misc/visitors/time-complexity/time 20 1215 ns/iter (± 0) 1208 ns/iter (± 11) 1.01
misc/visitors/time-complexity/time 40 6198 ns/iter (± 2) 6611 ns/iter (± 26) 0.94
misc/visitors/time-complexity/time 60 15571 ns/iter (± 13) 16756 ns/iter (± 57) 0.93
es/full-target/es2016 187613 ns/iter (± 521) 187676 ns/iter (± 825) 1.00
es/full-target/es2017 182535 ns/iter (± 719) 180185 ns/iter (± 930) 1.01
es/full-target/es2018 171480 ns/iter (± 472) 172502 ns/iter (± 373) 0.99
es2020_nullish_coalescing 66913 ns/iter (± 250) 67421 ns/iter (± 158) 0.99
es2020_optional_chaining 96284 ns/iter (± 2638) 93750 ns/iter (± 987) 1.03
es2022_class_properties 94584 ns/iter (± 193) 93446 ns/iter (± 228) 1.01
es2018_object_rest_spread 71335 ns/iter (± 136) 70877 ns/iter (± 466) 1.01
es2019_optional_catch_binding 60890 ns/iter (± 121) 61262 ns/iter (± 240) 0.99
es2017_async_to_generator 61539 ns/iter (± 124) 61213 ns/iter (± 341) 1.01
es2016_exponentiation 64834 ns/iter (± 89) 64707 ns/iter (± 477) 1.00
es2015_arrow 70149 ns/iter (± 131) 69818 ns/iter (± 628) 1.00
es2015_block_scoped_fn 66181 ns/iter (± 94) 66566 ns/iter (± 572) 0.99
es2015_block_scoping 158411 ns/iter (± 6569) 142585 ns/iter (± 7982) 1.11
es2015_classes 116898 ns/iter (± 296) 112797 ns/iter (± 1124) 1.04
es2015_computed_props 61114 ns/iter (± 129) 60399 ns/iter (± 832) 1.01
es2015_destructuring 117179 ns/iter (± 266) 117836 ns/iter (± 1565) 0.99
es2015_duplicate_keys 63541 ns/iter (± 117) 63532 ns/iter (± 94) 1.00
es2015_parameters 80117 ns/iter (± 188) 80204 ns/iter (± 334) 1.00
es2015_fn_name 66486 ns/iter (± 413) 65854 ns/iter (± 828) 1.01
es2015_for_of 64431 ns/iter (± 125) 64974 ns/iter (± 249) 0.99
es2015_instanceof 63540 ns/iter (± 202) 63533 ns/iter (± 96) 1.00
es2015_shorthand_property 61115 ns/iter (± 123) 61432 ns/iter (± 139) 0.99
es2015_spread 60962 ns/iter (± 173) 61323 ns/iter (± 133) 0.99
es2015_sticky_regex 62355 ns/iter (± 140) 62136 ns/iter (± 288) 1.00
es2015_typeof_symbol 62626 ns/iter (± 144) 61921 ns/iter (± 528) 1.01
es/transform/baseline/base 51923 ns/iter (± 153) 50718 ns/iter (± 417) 1.02
es/transform/baseline/common_reserved_word 62797 ns/iter (± 139) 61779 ns/iter (± 434) 1.02
es/transform/baseline/common_typescript 168185 ns/iter (± 1213) 163538 ns/iter (± 999) 1.03
es/target/es3 170805 ns/iter (± 367) 169833 ns/iter (± 297) 1.01
es/target/es2015 628290 ns/iter (± 1724) 627387 ns/iter (± 3931) 1.00
es/target/es2016 64924 ns/iter (± 115) 64518 ns/iter (± 471) 1.01
es/target/es2017 61853 ns/iter (± 73) 60872 ns/iter (± 496) 1.02
es/target/es2018 81381 ns/iter (± 116) 80451 ns/iter (± 743) 1.01
es/target/es2020 133098 ns/iter (± 280) 129202 ns/iter (± 908) 1.03
babelify-only 679322 ns/iter (± 871) 670503 ns/iter (± 1347) 1.01
parse_and_babelify_angular 42085645 ns/iter (± 648646) 41710330 ns/iter (± 760795) 1.01
parse_and_babelify_backbone 5364680 ns/iter (± 37000) 5364188 ns/iter (± 40641) 1.00
parse_and_babelify_jquery 31270368 ns/iter (± 215999) 30646111 ns/iter (± 351396) 1.02
parse_and_babelify_jquery_mobile 54317382 ns/iter (± 638162) 52676988 ns/iter (± 762519) 1.03
parse_and_babelify_mootools 32242724 ns/iter (± 215012) 31388369 ns/iter (± 525755) 1.03
parse_and_babelify_underscore 4318975 ns/iter (± 27234) 4377143 ns/iter (± 36505) 0.99
parse_and_babelify_yui 36931757 ns/iter (± 1858779) 30602447 ns/iter (± 889542) 1.21
html/minify/document/css_spec 42053441 ns/iter (± 243266) 41767601 ns/iter (± 292038) 1.01
html/minify/document/github 17558830 ns/iter (± 34626) 17158101 ns/iter (± 181719) 1.02
html/minify/document/stackoverflow 15705726 ns/iter (± 35448) 15241772 ns/iter (± 130735) 1.03
html/minify/document_fragment/css_spec 40166327 ns/iter (± 239123) 40269686 ns/iter (± 238956) 1.00
html/minify/document_fragment/github 16882885 ns/iter (± 22761) 16374022 ns/iter (± 139967) 1.03
html/minify/document_fragment/stackoverflow 15255871 ns/iter (± 126153) 14834844 ns/iter (± 154359) 1.03
html/document/visitor/compare/clone 340778 ns/iter (± 2448) 342010 ns/iter (± 1913) 1.00
html/document/visitor/compare/visit_mut_span 367113 ns/iter (± 1442) 361129 ns/iter (± 2288) 1.02
html/document/visitor/compare/visit_mut_span_panic 376631 ns/iter (± 2208) 375088 ns/iter (± 4870) 1.00
html/document/visitor/compare/fold_span 405872 ns/iter (± 1342) 399261 ns/iter (± 5092) 1.02
html/document/visitor/compare/fold_span_panic 471005 ns/iter (± 3089) 450059 ns/iter (± 3982) 1.05
html/document_fragment/visitor/compare/clone 338774 ns/iter (± 2522) 336454 ns/iter (± 2263) 1.01
html/document_fragment/visitor/compare/visit_mut_span 366266 ns/iter (± 2112) 371415 ns/iter (± 1611) 0.99
html/document_fragment/visitor/compare/visit_mut_span_panic 372863 ns/iter (± 1444) 378533 ns/iter (± 2301) 0.99
html/document_fragment/visitor/compare/fold_span 409699 ns/iter (± 3044) 410083 ns/iter (± 2345) 1.00
html/document_fragment/visitor/compare/fold_span_panic 462739 ns/iter (± 2370) 461820 ns/iter (± 3283) 1.00
html/lexer/css_2021_spec 15644822 ns/iter (± 131026) 15396411 ns/iter (± 56712) 1.02
html/lexer/github_com_17_05_2022 6086676 ns/iter (± 5281) 6000758 ns/iter (± 17784) 1.01
html/lexer/stackoverflow_com_17_05_2022 5693947 ns/iter (± 3547) 5612847 ns/iter (± 17248) 1.01
html/parser/parser_document/css_2021_spec 25621487 ns/iter (± 163184) 25649099 ns/iter (± 312183) 1.00
html/parser/parser_document/github_com_17_05_2022 8744834 ns/iter (± 15265) 8619110 ns/iter (± 64378) 1.01
html/parser/parser_document/stackoverflow_com_17_05_2022 7685313 ns/iter (± 9817) 7493152 ns/iter (± 55739) 1.03
html/parser/parser_document_fragment/css_2021_spec 25443006 ns/iter (± 133322) 25076554 ns/iter (± 392755) 1.01
html/parser/parser_document_fragment/github_com_17_05_2022 8730547 ns/iter (± 12877) 8744111 ns/iter (± 104472) 1.00
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022 7680804 ns/iter (± 5670) 7620504 ns/iter (± 55332) 1.01

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.