Skip to content

Commit

Permalink
fix(es/minifier): Abort seq inliner if a same var is defined in outer…
Browse files Browse the repository at this point in the history
… scope (#7772)

**Description:**

The algorithm here is directly copied from terser, I don't if it's correct or can be improved, but it does fix the issue.


**Related issue:**

 - Closes #7749
  • Loading branch information
Austaras authored Aug 9, 2023
1 parent c04ca52 commit ef8d121
Show file tree
Hide file tree
Showing 19 changed files with 180 additions and 120 deletions.
6 changes: 6 additions & 0 deletions crates/swc_ecma_ast/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,12 @@ impl Take for AssignExpr {
}
}

impl AssignExpr {
pub fn is_simple_assign(&self) -> bool {
self.op == op!("=") && self.left.as_ident().is_some()
}
}

// Custom deserializer to convert `PatOrExpr::Pat(Box<Pat::Ident>)`
// to `PatOrExpr::Expr(Box<Expr::Ident>)` when `op` is not `=`.
// Same logic as parser:
Expand Down
16 changes: 14 additions & 2 deletions crates/swc_ecma_minifier/src/compress/optimize/iife.rs
Original file line number Diff line number Diff line change
Expand Up @@ -869,9 +869,21 @@ impl Optimizer<'_> {
let ids: Vec<Id> = find_pat_ids(&decl.name);

for id in ids {
remap
.entry(id)
let ctx = remap
.entry(id.clone())
.or_insert_with(|| SyntaxContext::empty().apply_mark(Mark::new()));

// [is_skippable_for_seq] would check fn scope
if let Some(usage) = self.data.vars.get(&id) {
let mut usage = usage.clone();
usage.in_fn_scope_of = self.ctx.fn_scope;
// as we turn var declaration into assignment
// we need to maintain correct var usage
if decl.init.is_some() {
usage.ref_count += 1;
}
self.data.vars.insert((id.0, *ctx), usage);
}
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions crates/swc_ecma_minifier/src/compress/optimize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ struct Ctx {

/// Current scope.
scope: SyntaxContext,

/// Current function scope
fn_scope: SyntaxContext,
}

impl Ctx {
Expand Down Expand Up @@ -2134,6 +2137,7 @@ impl VisitMut for Optimizer<'_> {
skip_standalone: self.ctx.skip_standalone || is_standalone,
in_fn_like: true,
scope: n.span.ctxt,
fn_scope: n.span.ctxt,
top_level: false,

..self.ctx
Expand Down
65 changes: 42 additions & 23 deletions crates/swc_ecma_minifier/src/compress/optimize/sequences.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1158,25 +1158,14 @@ impl Optimizer<'_> {
)
}),
Mergable::Expr(a) => match a {
Expr::Assign(AssignExpr {
left,
right,
op: op!("="),
..
}) => {
if left.as_ident().is_some() {
Some(collect_infects_from(
right,
AliasConfig {
marks: Some(self.marks),
ignore_nested: true,
need_all: true,
},
))
} else {
None
}
}
Expr::Assign(a) if a.is_simple_assign() => Some(collect_infects_from(
&a.right,
AliasConfig {
marks: Some(self.marks),
ignore_nested: true,
need_all: true,
},
)),

_ => None,
},
Expand Down Expand Up @@ -1270,18 +1259,43 @@ impl Optimizer<'_> {
};

if let Some(a) = a {
let left_fn_scope = self
.data
.vars
.get(&left_id.to_id())
.map(|u| u.in_fn_scope_of)
.unwrap_or(self.expr_ctx.unresolved_ctxt);
match a {
Mergable::Var(a) => {
if is_ident_used_by(left_id.to_id(), &**a) {
log_abort!("e.left is used by a (var)");
return false;
}

if let Some(init) = &a.init {
if init.may_have_side_effects(&self.expr_ctx)
&& self.ctx.fn_scope != left_fn_scope
{
log_abort!("a (var) init has side effect");
return false;
}
}
}
Mergable::Expr(a) => {
if is_ident_used_by(left_id.to_id(), &**a) {
log_abort!("e.left is used by a (expr)");
return false;
}
let has_side_effect = match a {
Expr::Assign(a) if a.is_simple_assign() => {
a.right.may_have_side_effects(&self.expr_ctx)
}
_ => a.may_have_side_effects(&self.expr_ctx),
};
if has_side_effect && self.ctx.fn_scope != left_fn_scope {
log_abort!("a (expr) has side effect");
return false;
}
}
Mergable::FnDecl(a) => {
// TODO(kdy1): I'm not sure if this check is required.
Expand Down Expand Up @@ -1725,9 +1739,10 @@ impl Optimizer<'_> {
}

let b_left = b_assign.left.as_ident();
let b_left = match b_left {
Some(v) => v.clone(),
None => return Ok(false),
let b_left = if let Some(v) = b_left {
v.clone()
} else {
return Ok(false);
};

if !self.is_skippable_for_seq(Some(a), &Expr::Ident(b_left.clone())) {
Expand Down Expand Up @@ -2213,7 +2228,11 @@ impl Optimizer<'_> {
}

// We can remove this variable same as unused pass
if !usage.reassigned() && usage.usage_count == 1 && usage.declared {
if !usage.reassigned()
&& usage.usage_count == 1
&& usage.declared
&& !usage.used_recursively
{
can_remove = true;
}
} else {
Expand Down
4 changes: 4 additions & 0 deletions crates/swc_ecma_minifier/src/program_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ pub(crate) struct VarUsageInfo {
pub(crate) accessed_props: Box<AHashMap<JsWord, u32>>,

pub(crate) used_recursively: bool,

pub(crate) in_fn_scope_of: SyntaxContext,
}

impl Default for VarUsageInfo {
Expand Down Expand Up @@ -177,6 +179,7 @@ impl Default for VarUsageInfo {
is_top_level: Default::default(),
assigned_fn_local: true,
used_as_ref: false,
in_fn_scope_of: Default::default(),
}
}
}
Expand Down Expand Up @@ -364,6 +367,7 @@ impl Storage for ProgramData {
// }

let v = self.vars.entry(i.to_id()).or_default();
v.in_fn_scope_of = ctx.fn_scope;
v.is_top_level |= ctx.is_top_level;

if has_init && (v.declared || v.var_initialized) {
Expand Down
62 changes: 31 additions & 31 deletions crates/swc_ecma_minifier/tests/benches-full/echarts.js
Original file line number Diff line number Diff line change
Expand Up @@ -26730,21 +26730,21 @@
}
function updateRectShape(controller, cover, name, x, y, w, h) {
var points, xmin, ymin, el = cover.childOfName(name);
el && el.setShape((xmin = mathMin$9((points = clipByPanel(controller, cover, [
[
x,
y
],
[
x + w,
y + h
]
]))[0][0], points[1][0]), {
x: xmin,
el && el.setShape({
x: xmin = mathMin$9((points = clipByPanel(controller, cover, [
[
x,
y
],
[
x + w,
y + h
]
]))[0][0], points[1][0]),
y: ymin = mathMin$9(points[0][1], points[1][1]),
width: mathMax$9(points[0][0], points[1][0]) - xmin,
height: mathMax$9(points[0][1], points[1][1]) - ymin
}));
});
}
function makeStyle(brushOption) {
return defaults({
Expand Down Expand Up @@ -34700,25 +34700,25 @@
header.innerHTML = lang[0] || model.get('title'), header.style.cssText = 'margin: 10px 20px;', header.style.color = model.get('textColor');
var viewMain = document.createElement('div'), textarea = document.createElement('textarea');
viewMain.style.cssText = 'display:block;width:100%;overflow:auto;';
var optionToContent = model.get('optionToContent'), contentToOption = model.get('contentToOption'), result1 = (seriesGroupByCategoryAxis = {}, otherSeries = [], meta = [], ecModel.eachRawSeries(function(seriesModel) {
var coordSys = seriesModel.coordinateSystem;
if (coordSys && ('cartesian2d' === coordSys.type || 'polar' === coordSys.type)) {
var baseAxis = coordSys.getBaseAxis();
if ('category' === baseAxis.type) {
var key = baseAxis.dim + '_' + baseAxis.index;
seriesGroupByCategoryAxis[key] || (seriesGroupByCategoryAxis[key] = {
categoryAxis: baseAxis,
valueAxis: coordSys.getOtherAxis(baseAxis),
series: []
}, meta.push({
axisDim: baseAxis.dim,
axisIndex: baseAxis.index
})), seriesGroupByCategoryAxis[key].series.push(seriesModel);
} else otherSeries.push(seriesModel);
} else otherSeries.push(seriesModel);
}), {
var optionToContent = model.get('optionToContent'), contentToOption = model.get('contentToOption'), result1 = {
value: filter([
(groups = (result = {
(groups = (seriesGroupByCategoryAxis = {}, otherSeries = [], meta = [], ecModel.eachRawSeries(function(seriesModel) {
var coordSys = seriesModel.coordinateSystem;
if (coordSys && ('cartesian2d' === coordSys.type || 'polar' === coordSys.type)) {
var baseAxis = coordSys.getBaseAxis();
if ('category' === baseAxis.type) {
var key = baseAxis.dim + '_' + baseAxis.index;
seriesGroupByCategoryAxis[key] || (seriesGroupByCategoryAxis[key] = {
categoryAxis: baseAxis,
valueAxis: coordSys.getOtherAxis(baseAxis),
series: []
}, meta.push({
axisDim: baseAxis.dim,
axisIndex: baseAxis.index
})), seriesGroupByCategoryAxis[key].series.push(seriesModel);
} else otherSeries.push(seriesModel);
} else otherSeries.push(seriesModel);
}), result = {
seriesGroupByCategoryAxis: seriesGroupByCategoryAxis,
other: otherSeries,
meta: meta
Expand Down Expand Up @@ -34757,7 +34757,7 @@
return !!str.replace(/[\n\t\s]/g, '');
}).join('\n\n' + BLOCK_SPLITER + '\n\n'),
meta: result.meta
});
};
if ('function' == typeof optionToContent) {
var htmlOrDom = optionToContent(api.getOption());
'string' == typeof htmlOrDom ? viewMain.innerHTML = htmlOrDom : isDom(htmlOrDom) && viewMain.appendChild(htmlOrDom);
Expand Down
18 changes: 9 additions & 9 deletions crates/swc_ecma_minifier/tests/benches-full/victory.js
Original file line number Diff line number Diff line change
Expand Up @@ -13437,9 +13437,9 @@
return childComponents.map(function(child, index) {
var child1, props1, calculatedProps1, domain, scale, stringMap, categories, axisChild, role = child.type && child.type.role, style = Array.isArray(child.props.style) ? child.props.style : lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, child.props.style, {
parent: baseStyle
}), childProps = (child1 = child, props1 = props, calculatedProps1 = calculatedProps, axisChild = victory_core__WEBPACK_IMPORTED_MODULE_3__.Axis.findAxisComponents([
}), childProps = (child1 = child, props1 = props, calculatedProps1 = calculatedProps, (axisChild = victory_core__WEBPACK_IMPORTED_MODULE_3__.Axis.findAxisComponents([
child1
]), axisChild.length > 0 ? (axisChild[0], domain = calculatedProps1.domain, scale = calculatedProps1.scale, stringMap = calculatedProps1.stringMap, categories = calculatedProps1.categories, {
])).length > 0 ? (axisChild[0], domain = calculatedProps1.domain, scale = calculatedProps1.scale, stringMap = calculatedProps1.stringMap, categories = calculatedProps1.categories, {
stringMap: stringMap,
horizontal: calculatedProps1.horizontal,
categories: categories,
Expand Down Expand Up @@ -18467,8 +18467,8 @@
x: x,
y: y
};
var polarPadding = (style = props.style, degrees = getDegrees(props, datum), labelStyle = style.labels || {}, padding = _helpers__WEBPACK_IMPORTED_MODULE_1__.default.evaluateProp(labelStyle.padding, props) || 0, {
x: padding * Math.cos(angle = _helpers__WEBPACK_IMPORTED_MODULE_1__.default.degreesToRadians(degrees)),
var polarPadding = (style = props.style, degrees = getDegrees(props, datum), labelStyle = style.labels || {}, {
x: (padding = _helpers__WEBPACK_IMPORTED_MODULE_1__.default.evaluateProp(labelStyle.padding, props) || 0) * Math.cos(angle = _helpers__WEBPACK_IMPORTED_MODULE_1__.default.degreesToRadians(degrees)),
y: -padding * Math.sin(angle)
});
return {
Expand Down Expand Up @@ -28248,9 +28248,9 @@
{
key: "getCachedSharedEvents",
value: function(name, cacheValues) {
var arr, _ref2 = function(arr) {
var _ref = this.sharedEventsCache[name] || [], _ref2 = function(arr) {
if (Array.isArray(arr)) return arr;
}(arr = this.sharedEventsCache[name] || []) || function(arr, i) {
}(_ref) || function(arr, i) {
var _arr = [], _n = !0, _d = !1, _e = void 0;
try {
for(var _s, _i = arr[Symbol.iterator](); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !i || _arr.length !== i); _n = !0);
Expand All @@ -28264,7 +28264,7 @@
}
}
return _arr;
}(arr, 2) || function() {
}(_ref, 2) || function() {
throw TypeError("Invalid attempt to destructure non-iterable instance");
}(), sharedEvents = _ref2[0], prevCacheValues = _ref2[1];
if (sharedEvents && react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(cacheValues, prevCacheValues)) return sharedEvents;
Expand Down Expand Up @@ -28468,13 +28468,13 @@
return dataset.filter(function(datum) {
return null !== datum._x && null !== datum._y;
});
}), fillInMissingData = props1.fillInMissingData, xMap = filterNullChildData.reduce(function(prev, dataset) {
}), (fillInMissingData = props1.fillInMissingData, xMap = filterNullChildData.reduce(function(prev, dataset) {
return dataset.forEach(function(datum) {
prev[datum._x instanceof Date ? datum._x.getTime() : datum._x] = !0;
}), prev;
}, {}), xKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_1___default()(xMap).map(function(k) {
return +k;
}), xArr = lodash_orderBy__WEBPACK_IMPORTED_MODULE_0___default()(xKeys), (datasets = filterNullChildData.map(function(dataset) {
}), xArr = lodash_orderBy__WEBPACK_IMPORTED_MODULE_0___default()(xKeys), datasets = filterNullChildData.map(function(dataset) {
var indexOffset = 0, isDate = dataset[0] && dataset[0]._x instanceof Date;
return xArr.map(function(x, index) {
x = +x;
Expand Down
Loading

1 comment on commit ef8d121

@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: ef8d121 Previous: 76c6258 Ratio
es/full/bugs-1 299712 ns/iter (± 11532) 302433 ns/iter (± 9145) 0.99
es/full/minify/libraries/antd 1394631089 ns/iter (± 18613016) 1399873141 ns/iter (± 26662433) 1.00
es/full/minify/libraries/d3 302419949 ns/iter (± 5095944) 291312214 ns/iter (± 6362275) 1.04
es/full/minify/libraries/echarts 1137580764 ns/iter (± 24783375) 1121744008 ns/iter (± 16769582) 1.01
es/full/minify/libraries/jquery 87629996 ns/iter (± 982207) 87516659 ns/iter (± 1008232) 1.00
es/full/minify/libraries/lodash 102063730 ns/iter (± 1767861) 101006557 ns/iter (± 924613) 1.01
es/full/minify/libraries/moment 51367819 ns/iter (± 629236) 51160206 ns/iter (± 329732) 1.00
es/full/minify/libraries/react 18456412 ns/iter (± 165722) 18333372 ns/iter (± 157213) 1.01
es/full/minify/libraries/terser 234136784 ns/iter (± 4056186) 227732829 ns/iter (± 2162244) 1.03
es/full/minify/libraries/three 413849425 ns/iter (± 6739863) 404394957 ns/iter (± 5900297) 1.02
es/full/minify/libraries/typescript 2822062594 ns/iter (± 19076403) 2775790289 ns/iter (± 18303733) 1.02
es/full/minify/libraries/victory 617819051 ns/iter (± 18509842) 605374987 ns/iter (± 9628579) 1.02
es/full/minify/libraries/vue 126742550 ns/iter (± 2980845) 124300327 ns/iter (± 823100) 1.02
es/full/codegen/es3 33559 ns/iter (± 81) 36047 ns/iter (± 105) 0.93
es/full/codegen/es5 33453 ns/iter (± 75) 36025 ns/iter (± 87) 0.93
es/full/codegen/es2015 33416 ns/iter (± 48) 36046 ns/iter (± 61) 0.93
es/full/codegen/es2016 33414 ns/iter (± 107) 36097 ns/iter (± 64) 0.93
es/full/codegen/es2017 33483 ns/iter (± 91) 36010 ns/iter (± 53) 0.93
es/full/codegen/es2018 33459 ns/iter (± 75) 36055 ns/iter (± 97) 0.93
es/full/codegen/es2019 33461 ns/iter (± 58) 36076 ns/iter (± 119) 0.93
es/full/codegen/es2020 33459 ns/iter (± 92) 36057 ns/iter (± 47) 0.93
es/full/all/es3 172276978 ns/iter (± 1487369) 174093278 ns/iter (± 2233691) 0.99
es/full/all/es5 165624013 ns/iter (± 1086043) 164980742 ns/iter (± 945991) 1.00
es/full/all/es2015 123850732 ns/iter (± 703935) 125059279 ns/iter (± 657863) 0.99
es/full/all/es2016 123298297 ns/iter (± 723889) 124827361 ns/iter (± 1266109) 0.99
es/full/all/es2017 121849202 ns/iter (± 865918) 123924999 ns/iter (± 647447) 0.98
es/full/all/es2018 120433284 ns/iter (± 772849) 121269638 ns/iter (± 783413) 0.99
es/full/all/es2019 119539674 ns/iter (± 1004071) 121101010 ns/iter (± 745090) 0.99
es/full/all/es2020 114590260 ns/iter (± 642664) 116165562 ns/iter (± 663064) 0.99
es/full/parser 531729 ns/iter (± 4949) 538747 ns/iter (± 4466) 0.99
es/full/base/fixer 20523 ns/iter (± 302) 17702 ns/iter (± 180) 1.16
es/full/base/resolver_and_hygiene 82519 ns/iter (± 186) 82471 ns/iter (± 234) 1.00
serialization of serde 290 ns/iter (± 0) 297 ns/iter (± 1) 0.98
css/minify/libraries/bootstrap 30058238 ns/iter (± 361468) 29117016 ns/iter (± 308612) 1.03
css/visitor/compare/clone 1644864 ns/iter (± 6686) 1650069 ns/iter (± 9312) 1.00
css/visitor/compare/visit_mut_span 1781529 ns/iter (± 10874) 1776326 ns/iter (± 13315) 1.00
css/visitor/compare/visit_mut_span_panic 1852683 ns/iter (± 4170) 1860611 ns/iter (± 16797) 1.00
css/visitor/compare/fold_span 2615145 ns/iter (± 16861) 2588210 ns/iter (± 15179) 1.01
css/visitor/compare/fold_span_panic 2803104 ns/iter (± 34289) 2794161 ns/iter (± 20725) 1.00
css/lexer/bootstrap_5_1_3 4554118 ns/iter (± 5067) 4690502 ns/iter (± 2847) 0.97
css/lexer/foundation_6_7_4 3835552 ns/iter (± 3004) 3952392 ns/iter (± 3716) 0.97
css/lexer/tailwind_3_1_1 729151 ns/iter (± 324) 747301 ns/iter (± 3480) 0.98
css/parser/bootstrap_5_1_3 19473371 ns/iter (± 121937) 19152111 ns/iter (± 162428) 1.02
css/parser/foundation_6_7_4 15343105 ns/iter (± 941742) 15358295 ns/iter (± 85763) 1.00
css/parser/tailwind_3_1_1 2931218 ns/iter (± 39326) 2943144 ns/iter (± 3661) 1.00
es/codegen/colors 722797 ns/iter (± 397033) 738049 ns/iter (± 404528) 0.98
es/codegen/large 2918435 ns/iter (± 1541553) 2900987 ns/iter (± 1547003) 1.01
es/codegen/with-parser/colors 45478 ns/iter (± 620) 45372 ns/iter (± 520) 1.00
es/codegen/with-parser/large 489493 ns/iter (± 1355) 486708 ns/iter (± 2029) 1.01
es/minify/libraries/antd 1242606014 ns/iter (± 25169138) 1241382474 ns/iter (± 18047835) 1.00
es/minify/libraries/d3 255780279 ns/iter (± 6807460) 254413302 ns/iter (± 5978669) 1.01
es/minify/libraries/echarts 996370504 ns/iter (± 23538535) 986100649 ns/iter (± 16946437) 1.01
es/minify/libraries/jquery 75932903 ns/iter (± 555420) 76071910 ns/iter (± 549340) 1.00
es/minify/libraries/lodash 90428196 ns/iter (± 399630) 91121971 ns/iter (± 963681) 0.99
es/minify/libraries/moment 44681947 ns/iter (± 388386) 44653739 ns/iter (± 297601) 1.00
es/minify/libraries/react 16354682 ns/iter (± 156272) 16383704 ns/iter (± 136079) 1.00
es/minify/libraries/terser 195367956 ns/iter (± 1864302) 198162204 ns/iter (± 3780905) 0.99
es/minify/libraries/three 342422021 ns/iter (± 5546330) 347940277 ns/iter (± 7834524) 0.98
es/minify/libraries/typescript 2377877713 ns/iter (± 20813513) 2426803576 ns/iter (± 19302326) 0.98
es/minify/libraries/victory 514082512 ns/iter (± 6690608) 515399876 ns/iter (± 19246828) 1.00
es/minify/libraries/vue 109985116 ns/iter (± 1103594) 111230463 ns/iter (± 1349909) 0.99
es/visitor/compare/clone 1987662 ns/iter (± 9582) 1953709 ns/iter (± 5632) 1.02
es/visitor/compare/visit_mut_span 2335438 ns/iter (± 7790) 2316003 ns/iter (± 8172) 1.01
es/visitor/compare/visit_mut_span_panic 2367441 ns/iter (± 28112) 2342280 ns/iter (± 6730) 1.01
es/visitor/compare/fold_span 3411996 ns/iter (± 25372) 3378086 ns/iter (± 27117) 1.01
es/visitor/compare/fold_span_panic 3536757 ns/iter (± 44235) 3531839 ns/iter (± 85109) 1.00
es/lexer/colors 12865 ns/iter (± 17) 12876 ns/iter (± 49) 1.00
es/lexer/angular 6004294 ns/iter (± 6027) 5999244 ns/iter (± 10299) 1.00
es/lexer/backbone 770668 ns/iter (± 2712) 787497 ns/iter (± 1164) 0.98
es/lexer/jquery 4375412 ns/iter (± 4591) 4445509 ns/iter (± 5595) 0.98
es/lexer/jquery mobile 6707206 ns/iter (± 4530) 6726624 ns/iter (± 4858) 1.00
es/lexer/mootools 3464410 ns/iter (± 4578) 3502611 ns/iter (± 2250) 0.99
es/lexer/underscore 647259 ns/iter (± 648) 655692 ns/iter (± 297) 0.99
es/lexer/three 20826154 ns/iter (± 33028) 20982538 ns/iter (± 21406) 0.99
es/lexer/yui 3756131 ns/iter (± 1188) 3820452 ns/iter (± 1047) 0.98
es/parser/colors 27219 ns/iter (± 54) 27411 ns/iter (± 97) 0.99
es/parser/angular 13908487 ns/iter (± 162043) 13988857 ns/iter (± 190785) 0.99
es/parser/backbone 2023335 ns/iter (± 4014) 2020847 ns/iter (± 12071) 1.00
es/parser/jquery 11300653 ns/iter (± 269748) 11328541 ns/iter (± 168646) 1.00
es/parser/jquery mobile 17344700 ns/iter (± 359685) 17481954 ns/iter (± 308913) 0.99
es/parser/mootools 8545234 ns/iter (± 67523) 8545984 ns/iter (± 36529) 1.00
es/parser/underscore 1741986 ns/iter (± 11420) 1763528 ns/iter (± 9932) 0.99
es/parser/three 49239028 ns/iter (± 732146) 50346530 ns/iter (± 641954) 0.98
es/parser/yui 8453282 ns/iter (± 99648) 8476583 ns/iter (± 68927) 1.00
es/preset-env/usage/builtin_type 138407 ns/iter (± 33241) 134281 ns/iter (± 31092) 1.03
es/preset-env/usage/property 16677 ns/iter (± 73) 17406 ns/iter (± 50) 0.96
es/resolver/typescript 90534643 ns/iter (± 1558133) 92813227 ns/iter (± 1636992) 0.98
es/fixer/typescript 64557092 ns/iter (± 841588) 66887425 ns/iter (± 1248527) 0.97
es/hygiene/typescript 135372924 ns/iter (± 1688939) 135795133 ns/iter (± 1851047) 1.00
es/resolver_with_hygiene/typescript 252522879 ns/iter (± 4801228) 255711547 ns/iter (± 4948268) 0.99
es/visitor/base-perf/module_clone 58970 ns/iter (± 323) 58504 ns/iter (± 367) 1.01
es/visitor/base-perf/fold_empty 63315 ns/iter (± 797) 62826 ns/iter (± 497) 1.01
es/visitor/base-perf/fold_noop_impl_all 62726 ns/iter (± 491) 63758 ns/iter (± 248) 0.98
es/visitor/base-perf/fold_noop_impl_vec 63412 ns/iter (± 170) 63377 ns/iter (± 413) 1.00
es/visitor/base-perf/boxing_boxed_clone 57 ns/iter (± 0) 57 ns/iter (± 0) 1
es/visitor/base-perf/boxing_unboxed_clone 40 ns/iter (± 0) 39 ns/iter (± 0) 1.03
es/visitor/base-perf/boxing_boxed 106 ns/iter (± 0) 108 ns/iter (± 0) 0.98
es/visitor/base-perf/boxing_unboxed 75 ns/iter (± 0) 78 ns/iter (± 0) 0.96
es/visitor/base-perf/visit_empty 0 ns/iter (± 0) 0 ns/iter (± 0) NaN
es/visitor/base-perf/visit_contains_this 2432 ns/iter (± 12) 2528 ns/iter (± 14) 0.96
es/base/parallel/resolver/typescript 3645814264 ns/iter (± 231872778) 3941748667 ns/iter (± 317076874) 0.92
es/base/parallel/hygiene/typescript 1458012924 ns/iter (± 17085985) 1471490128 ns/iter (± 15547190) 0.99
misc/visitors/time-complexity/time 5 137 ns/iter (± 8) 132 ns/iter (± 7) 1.04
misc/visitors/time-complexity/time 10 372 ns/iter (± 8) 291 ns/iter (± 0) 1.28
misc/visitors/time-complexity/time 15 674 ns/iter (± 3) 690 ns/iter (± 1) 0.98
misc/visitors/time-complexity/time 20 1052 ns/iter (± 28) 1063 ns/iter (± 21) 0.99
misc/visitors/time-complexity/time 40 3705 ns/iter (± 64) 3563 ns/iter (± 8) 1.04
misc/visitors/time-complexity/time 60 7715 ns/iter (± 64) 7313 ns/iter (± 36) 1.05
es/full-target/es2016 231134 ns/iter (± 810) 229350 ns/iter (± 469) 1.01
es/full-target/es2017 218523 ns/iter (± 461) 217123 ns/iter (± 622) 1.01
es/full-target/es2018 206198 ns/iter (± 523) 206458 ns/iter (± 800) 1.00
es2020_nullish_coalescing 71468 ns/iter (± 330) 70588 ns/iter (± 509) 1.01
es2020_optional_chaining 83657 ns/iter (± 370) 83406 ns/iter (± 474) 1.00
es2022_class_properties 114673 ns/iter (± 185) 115355 ns/iter (± 328) 0.99
es2018_object_rest_spread 75465 ns/iter (± 426) 74989 ns/iter (± 537) 1.01
es2019_optional_catch_binding 65574 ns/iter (± 244) 65378 ns/iter (± 234) 1.00
es2017_async_to_generator 65455 ns/iter (± 241) 63908 ns/iter (± 211) 1.02
es2016_exponentiation 69724 ns/iter (± 314) 69324 ns/iter (± 276) 1.01
es2015_arrow 73264 ns/iter (± 275) 72891 ns/iter (± 343) 1.01
es2015_block_scoped_fn 69774 ns/iter (± 263) 69544 ns/iter (± 320) 1.00
es2015_block_scoping 123642 ns/iter (± 671) 123400 ns/iter (± 390) 1.00

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

Please sign in to comment.