Skip to content

Commit

Permalink
fix(es/minifier): Fix undefined judgement (#9146)
Browse files Browse the repository at this point in the history
**Description:**

by symbol name -> by whether it points to global undefined or not.

The updated test results all involve variables with `undefined` ident (although they are indeed uninitialized).


**Related issue:**

 - Closes: #8567
  • Loading branch information
CPunisher authored Jul 5, 2024
1 parent 2481d73 commit 1a739b7
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,13 @@ import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
return impl.prepareDetectionCache(this._cache, this.ua, this.maxPhoneWidth), this._cache.tablet;
},
userAgent: function() {
return undefined === this._cache.userAgent && (this._cache.userAgent = impl.findMatch(impl.mobileDetectRules.uas, this.ua)), this._cache.userAgent;
return this._cache.userAgent === undefined && (this._cache.userAgent = impl.findMatch(impl.mobileDetectRules.uas, this.ua)), this._cache.userAgent;
},
userAgents: function() {
return undefined === this._cache.userAgents && (this._cache.userAgents = impl.findMatches(impl.mobileDetectRules.uas, this.ua)), this._cache.userAgents;
return this._cache.userAgents === undefined && (this._cache.userAgents = impl.findMatches(impl.mobileDetectRules.uas, this.ua)), this._cache.userAgents;
},
os: function() {
return undefined === this._cache.os && (this._cache.os = impl.detectOS(this.ua)), this._cache.os;
return this._cache.os === undefined && (this._cache.os = impl.detectOS(this.ua)), this._cache.os;
},
version: function(key) {
return impl.getVersion(key, this.ua);
Expand All @@ -400,7 +400,7 @@ import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
return MobileDetect.isPhoneSized(maxPhoneWidth || this.maxPhoneWidth);
},
mobileGrade: function() {
return undefined === this._cache.grade && (this._cache.grade = impl.mobileGrade(this)), this._cache.grade;
return this._cache.grade === undefined && (this._cache.grade = impl.mobileGrade(this)), this._cache.grade;
}
}, 'undefined' != typeof window && window.screen ? MobileDetect.isPhoneSized = function(maxPhoneWidth) {
return maxPhoneWidth < 0 ? undefined : impl.getDeviceSmallerSide() <= maxPhoneWidth;
Expand Down
4 changes: 1 addition & 3 deletions crates/swc_ecma_minifier/src/compress/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,15 +378,13 @@ pub(crate) fn negate_cost(

pub(crate) fn is_pure_undefined(expr_ctx: &ExprCtx, e: &Expr) -> bool {
match e {
Expr::Ident(Ident { sym, .. }) if &**sym == "undefined" => true,

Expr::Unary(UnaryExpr {
op: UnaryOp::Void,
arg,
..
}) if !arg.may_have_side_effects(expr_ctx) => true,

_ => false,
_ => e.is_undefined(expr_ctx),
}
}

Expand Down
6 changes: 3 additions & 3 deletions crates/swc_ecma_minifier/tests/benches-full/lodash.js
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@
return hasOwnProperty.call(data, key) ? data[key] : undefined;
}, Hash.prototype.has = function(key) {
var data = this.__data__;
return nativeCreate ? undefined !== data[key] : hasOwnProperty.call(data, key);
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
}, Hash.prototype.set = function(key, value) {
var data = this.__data__;
return this.size += this.has(key) ? 0 : 1, data[key] = nativeCreate && undefined === value ? HASH_UNDEFINED : value, this;
Expand Down Expand Up @@ -1546,7 +1546,7 @@
}
(value = source[5]) && (partials = data[5], data[5] = partials ? composeArgsRight(partials, value, source[6]) : value, data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]), (value = source[7]) && (data[7] = value), 128 & srcBitmask && (data[8] = null == data[8] ? source[8] : nativeMin(data[8], source[8])), null == data[9] && (data[9] = source[9]), data[0] = source[0], data[1] = newBitmask;
}
}(newData, data), func = newData[0], bitmask = newData[1], thisArg = newData[2], partials = newData[3], holders = newData[4], (arity = newData[9] = undefined === newData[9] ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0)) || !(24 & bitmask) || (bitmask &= -25), bitmask && 1 != bitmask) 8 == bitmask || 16 == bitmask ? (func1 = func, bitmask1 = bitmask, arity1 = arity, Ctor = createCtor(func1), result = function wrapper() {
}(newData, data), func = newData[0], bitmask = newData[1], thisArg = newData[2], partials = newData[3], holders = newData[4], (arity = newData[9] = newData[9] === undefined ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0)) || !(24 & bitmask) || (bitmask &= -25), bitmask && 1 != bitmask) 8 == bitmask || 16 == bitmask ? (func1 = func, bitmask1 = bitmask, arity1 = arity, Ctor = createCtor(func1), result = function wrapper() {
for(var length = arguments.length, args = Array1(length), index = length, placeholder = getHolder(wrapper); index--;)args[index] = arguments[index];
var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
return (length -= holders.length) < arity1 ? createRecurry(func1, bitmask1, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity1 - length) : apply(this && this !== root && this instanceof wrapper ? Ctor : func1, this, args);
Expand Down Expand Up @@ -3061,7 +3061,7 @@
}, lodash.prototype.commit = function() {
return new LodashWrapper(this.value(), this.__chain__);
}, lodash.prototype.next = function() {
undefined === this.__values__ && (this.__values__ = toArray(this.value()));
this.__values__ === undefined && (this.__values__ = toArray(this.value()));
var done = this.__index__ >= this.__values__.length, value = done ? undefined : this.__values__[this.__index__++];
return {
done: done,
Expand Down
5 changes: 5 additions & 0 deletions crates/swc_ecma_minifier/tests/fixture/issues/8567/input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const templatePath = () => {
const undefined = "lol1";
return undefined;
};
console.log(templatePath());
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("lol1");

Large diffs are not rendered by default.

45 changes: 18 additions & 27 deletions crates/swc_ecma_minifier/tests/projects/output/angular-1.2.5.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
if (!equals(o1[key], o2[key])) return !1;
keySet[key] = !0;
}
for(key in o2)if (!keySet.hasOwnProperty(key) && "$" !== key.charAt(0) && undefined !== o2[key] && !isFunction(o2[key])) return !1;
for(key in o2)if (!keySet.hasOwnProperty(key) && "$" !== key.charAt(0) && o2[key] !== undefined && !isFunction(o2[key])) return !1;
return !0;
}
}
Expand Down Expand Up @@ -199,7 +199,7 @@
return "string" == typeof key && "$" === key.charAt(0) ? val = undefined : isWindow(value) ? val = "$WINDOW" : value && document1 === value ? val = "$DOCUMENT" : isScope(value) && (val = "$SCOPE"), val;
}
function toJson(obj, pretty) {
if (void 0 !== obj) return JSON.stringify(obj, toJsonReplacer, pretty ? " " : null);
return void 0 === obj ? undefined : JSON.stringify(obj, toJsonReplacer, pretty ? " " : null);
}
function fromJson(json) {
return isString(json) ? JSON.parse(json) : json;
Expand Down Expand Up @@ -440,7 +440,7 @@
for(var names = isArray(name) ? name : [
name
]; element.length;){
for(var i = 0, ii = names.length; i < ii; i++)if (undefined !== (value = element.data(names[i]))) return value;
for(var i = 0, ii = names.length; i < ii; i++)if ((value = element.data(names[i])) !== undefined) return value;
element = element.parent();
}
}
Expand Down Expand Up @@ -939,7 +939,7 @@
var cookieLength, cookieArray, cookie, i, index;
if (name) undefined === value ? rawDocument.cookie = escape(name) + "=;path=" + cookiePath + ";expires=Thu, 01 Jan 1970 00:00:00 GMT" : isString(value) && (cookieLength = (rawDocument.cookie = escape(name) + "=" + escape(value) + ";path=" + cookiePath).length + 1) > 4096 && $log.warn("Cookie '" + name + "' possibly not set or overflowed because it was too large (" + cookieLength + " > 4096 bytes)!");
else {
if (rawDocument.cookie !== lastCookieString) for(i = 0, cookieArray = (lastCookieString = rawDocument.cookie).split("; "), lastCookies = {}; i < cookieArray.length; i++)(index = (cookie = cookieArray[i]).indexOf("=")) > 0 && undefined === lastCookies[name = unescape(cookie.substring(0, index))] && (lastCookies[name] = unescape(cookie.substring(index + 1)));
if (rawDocument.cookie !== lastCookieString) for(i = 0, cookieArray = (lastCookieString = rawDocument.cookie).split("; "), lastCookies = {}; i < cookieArray.length; i++)(index = (cookie = cookieArray[i]).indexOf("=")) > 0 && lastCookies[name = unescape(cookie.substring(0, index))] === undefined && (lastCookies[name] = unescape(cookie.substring(index + 1)));
return lastCookies;
}
}, self.defer = function(fn, delay) {
Expand Down Expand Up @@ -1847,7 +1847,7 @@
this.$$url = encodePath(this.$$path) + (search ? "?" + search : "") + hash, this.$$absUrl = appBaseNoFile + this.$$url.substr(1);
}, this.$$rewrite = function(url) {
var appUrl, prevAppUrl;
return undefined !== (appUrl = beginsWith(appBase, url)) ? (prevAppUrl = appUrl, undefined !== (appUrl = beginsWith(basePrefix, appUrl))) ? appBaseNoFile + (beginsWith("/", appUrl) || appUrl) : appBase + prevAppUrl : undefined !== (appUrl = beginsWith(appBaseNoFile, url)) ? appBaseNoFile + appUrl : appBaseNoFile == url + "/" ? appBaseNoFile : void 0;
return (appUrl = beginsWith(appBase, url)) !== undefined ? (prevAppUrl = appUrl, (appUrl = beginsWith(basePrefix, appUrl)) !== undefined) ? appBaseNoFile + (beginsWith("/", appUrl) || appUrl) : appBase + prevAppUrl : (appUrl = beginsWith(appBaseNoFile, url)) !== undefined ? appBaseNoFile + appUrl : appBaseNoFile == url + "/" ? appBaseNoFile : void 0;
};
}
function LocationHashbangUrl(appBase, hashPrefix) {
Expand Down Expand Up @@ -2246,7 +2246,7 @@
promise.then(function(val) {
promise.$$v = val;
});
}(obj), undefined === obj.$$v && (obj.$$v = {}), obj = obj.$$v);
}(obj), obj.$$v === undefined && (obj.$$v = {}), obj = obj.$$v);
}
return obj[key = ensureSafeMemberName(element.shift(), fullExp)] = setValue, setValue;
}
Expand Down Expand Up @@ -2403,9 +2403,9 @@
var parser = this, indexFn = this.expression();
return this.consume("]"), extend(function(self, locals) {
var v, p, o = obj(self, locals), i = indexFn(self, locals);
if (o) return (v = ensureSafeObject(o[i], parser.text)) && v.then && parser.options.unwrapPromises && (p = v, "$$v" in v || (p.$$v = undefined, p.then(function(val) {
return o ? ((v = ensureSafeObject(o[i], parser.text)) && v.then && parser.options.unwrapPromises && (p = v, "$$v" in v || (p.$$v = undefined, p.then(function(val) {
p.$$v = val;
})), v = v.$$v), v;
})), v = v.$$v), v) : undefined;
}, {
assign: function(self, value, locals) {
var key = indexFn(self, locals);
Expand Down Expand Up @@ -3488,44 +3488,38 @@
number: function(scope, element, attr, ctrl, $sniffer, $browser) {
if (textInputType(scope, element, attr, ctrl, $sniffer, $browser), ctrl.$parsers.push(function(value) {
var empty = ctrl.$isEmpty(value);
if (empty || NUMBER_REGEXP.test(value)) return ctrl.$setValidity("number", !0), "" === value ? null : empty ? value : parseFloat(value);
ctrl.$setValidity("number", !1);
return empty || NUMBER_REGEXP.test(value) ? (ctrl.$setValidity("number", !0), "" === value ? null : empty ? value : parseFloat(value)) : (ctrl.$setValidity("number", !1), undefined);
}), ctrl.$formatters.push(function(value) {
return ctrl.$isEmpty(value) ? "" : "" + value;
}), attr.min) {
var minValidator = function(value) {
var min = parseFloat(attr.min);
if (ctrl.$isEmpty(value) || !(value < min)) return ctrl.$setValidity("min", !0), value;
ctrl.$setValidity("min", !1);
return !ctrl.$isEmpty(value) && value < min ? (ctrl.$setValidity("min", !1), undefined) : (ctrl.$setValidity("min", !0), value);
};
ctrl.$parsers.push(minValidator), ctrl.$formatters.push(minValidator);
}
if (attr.max) {
var maxValidator = function(value) {
var max = parseFloat(attr.max);
if (ctrl.$isEmpty(value) || !(value > max)) return ctrl.$setValidity("max", !0), value;
ctrl.$setValidity("max", !1);
return !ctrl.$isEmpty(value) && value > max ? (ctrl.$setValidity("max", !1), undefined) : (ctrl.$setValidity("max", !0), value);
};
ctrl.$parsers.push(maxValidator), ctrl.$formatters.push(maxValidator);
}
ctrl.$formatters.push(function(value) {
if (ctrl.$isEmpty(value) || isNumber(value)) return ctrl.$setValidity("number", !0), value;
ctrl.$setValidity("number", !1);
return ctrl.$isEmpty(value) || isNumber(value) ? (ctrl.$setValidity("number", !0), value) : (ctrl.$setValidity("number", !1), undefined);
});
},
url: function(scope, element, attr, ctrl, $sniffer, $browser) {
textInputType(scope, element, attr, ctrl, $sniffer, $browser);
var urlValidator = function(value) {
if (ctrl.$isEmpty(value) || URL_REGEXP.test(value)) return ctrl.$setValidity("url", !0), value;
ctrl.$setValidity("url", !1);
return ctrl.$isEmpty(value) || URL_REGEXP.test(value) ? (ctrl.$setValidity("url", !0), value) : (ctrl.$setValidity("url", !1), undefined);
};
ctrl.$formatters.push(urlValidator), ctrl.$parsers.push(urlValidator);
},
email: function(scope, element, attr, ctrl, $sniffer, $browser) {
textInputType(scope, element, attr, ctrl, $sniffer, $browser);
var emailValidator = function(value) {
if (ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value)) return ctrl.$setValidity("email", !0), value;
ctrl.$setValidity("email", !1);
return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value) ? (ctrl.$setValidity("email", !0), value) : (ctrl.$setValidity("email", !1), undefined);
};
ctrl.$formatters.push(emailValidator), ctrl.$parsers.push(emailValidator);
},
Expand Down Expand Up @@ -3591,8 +3585,7 @@
element.val(ctrl.$isEmpty(ctrl.$viewValue) ? "" : ctrl.$viewValue);
};
var patternValidator, match, pattern = attr.ngPattern, validate = function(regexp, value) {
if (ctrl.$isEmpty(value) || regexp.test(value)) return ctrl.$setValidity("pattern", !0), value;
ctrl.$setValidity("pattern", !1);
return ctrl.$isEmpty(value) || regexp.test(value) ? (ctrl.$setValidity("pattern", !0), value) : (ctrl.$setValidity("pattern", !1), undefined);
};
if (pattern && ((match = pattern.match(/^\/(.*)\/([gim]*)$/)) ? (pattern = new RegExp(match[1], match[2]), patternValidator = function(value) {
return validate(pattern, value);
Expand All @@ -3602,15 +3595,13 @@
return validate(patternObj, value);
}, ctrl.$formatters.push(patternValidator), ctrl.$parsers.push(patternValidator)), attr.ngMinlength) {
var minlength = int(attr.ngMinlength), minLengthValidator = function(value) {
if (ctrl.$isEmpty(value) || !(value.length < minlength)) return ctrl.$setValidity("minlength", !0), value;
ctrl.$setValidity("minlength", !1);
return !ctrl.$isEmpty(value) && value.length < minlength ? (ctrl.$setValidity("minlength", !1), undefined) : (ctrl.$setValidity("minlength", !0), value);
};
ctrl.$parsers.push(minLengthValidator), ctrl.$formatters.push(minLengthValidator);
}
if (attr.ngMaxlength) {
var maxlength = int(attr.ngMaxlength), maxLengthValidator = function(value) {
if (ctrl.$isEmpty(value) || !(value.length > maxlength)) return ctrl.$setValidity("maxlength", !0), value;
ctrl.$setValidity("maxlength", !1);
return !ctrl.$isEmpty(value) && value.length > maxlength ? (ctrl.$setValidity("maxlength", !1), undefined) : (ctrl.$setValidity("maxlength", !0), value);
};
ctrl.$parsers.push(maxLengthValidator), ctrl.$formatters.push(maxLengthValidator);
}
Expand Down Expand Up @@ -3720,7 +3711,7 @@
}), list;
}
}), ctrl.$formatters.push(function(value) {
if (isArray(value)) return value.join(", ");
return isArray(value) ? value.join(", ") : undefined;
}), ctrl.$isEmpty = function(value) {
return !value || !value.length;
};
Expand Down
Loading

1 comment on commit 1a739b7

@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: 1a739b7 Previous: 307b6f2 Ratio
es/full/bugs-1 274048 ns/iter (± 2222) 277530 ns/iter (± 1316) 0.99
es/full/minify/libraries/antd 1695564822 ns/iter (± 43062858) 2068690340 ns/iter (± 66548630) 0.82
es/full/minify/libraries/d3 338251959 ns/iter (± 1372251) 427297670 ns/iter (± 10527793) 0.79
es/full/minify/libraries/echarts 1427217495 ns/iter (± 14874268) 1782403033 ns/iter (± 21631962) 0.80
es/full/minify/libraries/jquery 102396840 ns/iter (± 308663) 110711034 ns/iter (± 1613653) 0.92
es/full/minify/libraries/lodash 112668806 ns/iter (± 355384) 121856807 ns/iter (± 1883026) 0.92
es/full/minify/libraries/moment 59554359 ns/iter (± 151920) 62759261 ns/iter (± 401796) 0.95
es/full/minify/libraries/react 18508415 ns/iter (± 92394) 19039215 ns/iter (± 103697) 0.97
es/full/minify/libraries/terser 280054199 ns/iter (± 4005184) 341682493 ns/iter (± 13840088) 0.82
es/full/minify/libraries/three 500566661 ns/iter (± 7436001) 636074858 ns/iter (± 22958037) 0.79
es/full/minify/libraries/typescript 3287195497 ns/iter (± 43476806) 3535337889 ns/iter (± 33966321) 0.93
es/full/minify/libraries/victory 848389974 ns/iter (± 27201697) 1019700307 ns/iter (± 19897044) 0.83
es/full/minify/libraries/vue 147448330 ns/iter (± 1185001) 160562412 ns/iter (± 1996125) 0.92
es/full/codegen/es3 59348 ns/iter (± 346) 60539 ns/iter (± 164) 0.98
es/full/codegen/es5 59727 ns/iter (± 438) 61459 ns/iter (± 490) 0.97
es/full/codegen/es2015 59537 ns/iter (± 84) 60896 ns/iter (± 420) 0.98
es/full/codegen/es2016 59131 ns/iter (± 190) 61107 ns/iter (± 558) 0.97
es/full/codegen/es2017 59344 ns/iter (± 255) 60855 ns/iter (± 355) 0.98
es/full/codegen/es2018 58975 ns/iter (± 112) 61255 ns/iter (± 454) 0.96
es/full/codegen/es2019 59036 ns/iter (± 110) 61536 ns/iter (± 395) 0.96
es/full/codegen/es2020 59019 ns/iter (± 181) 60531 ns/iter (± 103) 0.98
es/full/all/es3 162000009 ns/iter (± 623583) 165173322 ns/iter (± 587926) 0.98
es/full/all/es5 156348179 ns/iter (± 1108289) 159546007 ns/iter (± 405631) 0.98
es/full/all/es2015 115448792 ns/iter (± 904062) 117744203 ns/iter (± 917189) 0.98
es/full/all/es2016 113968466 ns/iter (± 768481) 116652402 ns/iter (± 1328741) 0.98
es/full/all/es2017 113513408 ns/iter (± 617416) 115828027 ns/iter (± 2321375) 0.98
es/full/all/es2018 111808085 ns/iter (± 677179) 113835680 ns/iter (± 878329) 0.98
es/full/all/es2019 111009208 ns/iter (± 575939) 113487523 ns/iter (± 602199) 0.98
es/full/all/es2020 106938012 ns/iter (± 835655) 108667012 ns/iter (± 558434) 0.98
es/full/parser 463013 ns/iter (± 2555) 461526 ns/iter (± 3091) 1.00
es/full/base/fixer 16571 ns/iter (± 53) 15260 ns/iter (± 58) 1.09
es/full/base/resolver_and_hygiene 81205 ns/iter (± 332) 81899 ns/iter (± 332) 0.99
serialization of serde 268 ns/iter (± 8) 271 ns/iter (± 7) 0.99
css/minify/libraries/bootstrap 21852382 ns/iter (± 52767) 22232929 ns/iter (± 491634) 0.98
css/visitor/compare/clone 1370006 ns/iter (± 28720) 1365448 ns/iter (± 9489) 1.00
css/visitor/compare/visit_mut_span 1492342 ns/iter (± 10608) 1479961 ns/iter (± 22575) 1.01
css/visitor/compare/visit_mut_span_panic 1514365 ns/iter (± 38888) 1492992 ns/iter (± 43582) 1.01
css/visitor/compare/fold_span 2012359 ns/iter (± 13215) 1998134 ns/iter (± 18055) 1.01
css/visitor/compare/fold_span_panic 2137985 ns/iter (± 8115) 2119601 ns/iter (± 3059) 1.01
css/lexer/bootstrap_5_1_3 3495403 ns/iter (± 12766) 3510020 ns/iter (± 27575) 1.00
css/lexer/foundation_6_7_4 2820485 ns/iter (± 2042) 2830925 ns/iter (± 2400) 1.00
css/lexer/tailwind_3_1_1 541704 ns/iter (± 453) 548287 ns/iter (± 621) 0.99
css/parser/bootstrap_5_1_3 16390690 ns/iter (± 75830) 16142257 ns/iter (± 124520) 1.02
css/parser/foundation_6_7_4 13066224 ns/iter (± 51006) 12847036 ns/iter (± 7496) 1.02
css/parser/tailwind_3_1_1 2595918 ns/iter (± 6334) 2532937 ns/iter (± 6072) 1.02
es/codegen/colors 751181 ns/iter (± 397426) 723205 ns/iter (± 395543) 1.04
es/codegen/large 3104250 ns/iter (± 1603922) 2954185 ns/iter (± 1592191) 1.05
es/codegen/with-parser/colors 40273 ns/iter (± 275) 40373 ns/iter (± 1056) 1.00
es/codegen/with-parser/large 454966 ns/iter (± 2411) 450111 ns/iter (± 2507) 1.01
es/minify/libraries/antd 1506570317 ns/iter (± 64616813) 1556035566 ns/iter (± 19953000) 0.97
es/minify/libraries/d3 280033637 ns/iter (± 2080207) 311269941 ns/iter (± 14002778) 0.90
es/minify/libraries/echarts 1134426473 ns/iter (± 9853246) 1271524527 ns/iter (± 10723565) 0.89
es/minify/libraries/jquery 82544266 ns/iter (± 561856) 83856042 ns/iter (± 812646) 0.98
es/minify/libraries/lodash 104520766 ns/iter (± 662042) 106062425 ns/iter (± 286615) 0.99
es/minify/libraries/moment 48301710 ns/iter (± 129726) 48967298 ns/iter (± 129629) 0.99
es/minify/libraries/react 16269318 ns/iter (± 15714) 16402658 ns/iter (± 61338) 0.99
es/minify/libraries/terser 216415118 ns/iter (± 1016348) 234130276 ns/iter (± 3193616) 0.92
es/minify/libraries/three 365704664 ns/iter (± 12829052) 415752693 ns/iter (± 9149091) 0.88
es/minify/libraries/typescript 2726964196 ns/iter (± 14042092) 2908174544 ns/iter (± 39554690) 0.94
es/minify/libraries/victory 563844360 ns/iter (± 5505773) 687124561 ns/iter (± 23994129) 0.82
es/minify/libraries/vue 121634496 ns/iter (± 288874) 125026827 ns/iter (± 1194551) 0.97
es/visitor/compare/clone 1726175 ns/iter (± 45558) 1727597 ns/iter (± 21324) 1.00
es/visitor/compare/visit_mut_span 2071947 ns/iter (± 9635) 2156759 ns/iter (± 51195) 0.96
es/visitor/compare/visit_mut_span_panic 2066842 ns/iter (± 28863) 2092305 ns/iter (± 29832) 0.99
es/visitor/compare/fold_span 2790543 ns/iter (± 9084) 2778381 ns/iter (± 7245) 1.00
es/visitor/compare/fold_span_panic 2813270 ns/iter (± 35620) 2852048 ns/iter (± 16530) 0.99
es/lexer/colors 9745 ns/iter (± 22) 9490 ns/iter (± 35) 1.03
es/lexer/angular 5082442 ns/iter (± 4202) 5017920 ns/iter (± 15584) 1.01
es/lexer/backbone 634768 ns/iter (± 2907) 642690 ns/iter (± 9735) 0.99
es/lexer/jquery 3535031 ns/iter (± 3280) 3655353 ns/iter (± 29214) 0.97
es/lexer/jquery mobile 5289261 ns/iter (± 14665) 5620256 ns/iter (± 71086) 0.94
es/lexer/mootools 2804875 ns/iter (± 16049) 2880228 ns/iter (± 34123) 0.97
es/lexer/underscore 518835 ns/iter (± 1489) 540991 ns/iter (± 9134) 0.96
es/lexer/three 16051308 ns/iter (± 48689) 16387885 ns/iter (± 92188) 0.98
es/lexer/yui 2930361 ns/iter (± 25058) 2892301 ns/iter (± 26856) 1.01
es/lexer/cal-com 13273610 ns/iter (± 105495) 13159071 ns/iter (± 612183) 1.01
es/lexer/typescript 91338834 ns/iter (± 1048988) 91636924 ns/iter (± 526946) 1.00
es/parser/colors 23748 ns/iter (± 93) 23413 ns/iter (± 360) 1.01
es/parser/angular 12575286 ns/iter (± 72291) 12501227 ns/iter (± 104762) 1.01
es/parser/backbone 1827980 ns/iter (± 5369) 1820893 ns/iter (± 9018) 1.00
es/parser/jquery 10078458 ns/iter (± 63148) 10080518 ns/iter (± 71709) 1.00
es/parser/jquery mobile 15254876 ns/iter (± 132258) 15157022 ns/iter (± 210538) 1.01
es/parser/mootools 7825589 ns/iter (± 22352) 7812212 ns/iter (± 19503) 1.00
es/parser/underscore 1589804 ns/iter (± 5456) 1593610 ns/iter (± 9578) 1.00
es/parser/three 44457714 ns/iter (± 504088) 44697310 ns/iter (± 867289) 0.99
es/parser/yui 7467198 ns/iter (± 35468) 7398709 ns/iter (± 34944) 1.01
es/parser/cal-com 41156599 ns/iter (± 728390) 39490776 ns/iter (± 429206) 1.04
es/parser/typescript 271669758 ns/iter (± 1451951) 267700269 ns/iter (± 2230846) 1.01
es/preset-env/usage/builtin_type 136446 ns/iter (± 34611) 141391 ns/iter (± 34398) 0.97
es/preset-env/usage/property 16400 ns/iter (± 56) 17394 ns/iter (± 246) 0.94
es/resolver/typescript 99383960 ns/iter (± 1753856) 97988238 ns/iter (± 2700930) 1.01
es/fixer/typescript 80600192 ns/iter (± 3461926) 82433309 ns/iter (± 1841599) 0.98
es/hygiene/typescript 187322364 ns/iter (± 4240872) 172221570 ns/iter (± 2318823) 1.09
es/resolver_with_hygiene/typescript 309636056 ns/iter (± 5850904) 304014032 ns/iter (± 3698153) 1.02
es/visitor/base-perf/module_clone 55740 ns/iter (± 460) 56385 ns/iter (± 392) 0.99
es/visitor/base-perf/fold_empty 59330 ns/iter (± 563) 59508 ns/iter (± 274) 1.00
es/visitor/base-perf/fold_noop_impl_all 59170 ns/iter (± 466) 59542 ns/iter (± 1412) 0.99
es/visitor/base-perf/fold_noop_impl_vec 59670 ns/iter (± 709) 59118 ns/iter (± 324) 1.01
es/visitor/base-perf/boxing_boxed_clone 59 ns/iter (± 0) 62 ns/iter (± 0) 0.95
es/visitor/base-perf/boxing_unboxed_clone 47 ns/iter (± 2) 47 ns/iter (± 0) 1
es/visitor/base-perf/boxing_boxed 106 ns/iter (± 0) 106 ns/iter (± 0) 1
es/visitor/base-perf/boxing_unboxed 79 ns/iter (± 0) 81 ns/iter (± 0) 0.98
es/visitor/base-perf/visit_contains_this 2572 ns/iter (± 12) 2588 ns/iter (± 50) 0.99
es/base/parallel/resolver/typescript 2380133784 ns/iter (± 113477499) 2487456796 ns/iter (± 116512734) 0.96
es/base/parallel/hygiene/typescript 3213274802 ns/iter (± 67879057) 3254392236 ns/iter (± 58144088) 0.99
babelify-only 490130 ns/iter (± 4591) 494774 ns/iter (± 20105) 0.99
parse_and_babelify_angular 40183701 ns/iter (± 491821) 37196429 ns/iter (± 343475) 1.08
parse_and_babelify_backbone 4558441 ns/iter (± 187783) 4340368 ns/iter (± 146357) 1.05
parse_and_babelify_jquery 31788859 ns/iter (± 499855) 29004369 ns/iter (± 410581) 1.10
parse_and_babelify_jquery_mobile 54354191 ns/iter (± 959141) 50614574 ns/iter (± 1083053) 1.07
parse_and_babelify_mootools 29211635 ns/iter (± 548622) 25715385 ns/iter (± 246791) 1.14
parse_and_babelify_underscore 3752039 ns/iter (± 28073) 3662514 ns/iter (± 8100) 1.02
parse_and_babelify_yui 26767573 ns/iter (± 312629) 24313523 ns/iter (± 508815) 1.10
html/minify/document/css_spec 45176997 ns/iter (± 83988) 45347455 ns/iter (± 844079) 1.00
html/minify/document/github 18150050 ns/iter (± 109889) 18175235 ns/iter (± 144195) 1.00
html/minify/document/stackoverflow 16488364 ns/iter (± 348188) 16616657 ns/iter (± 593523) 0.99
html/minify/document_fragment/css_spec 43571678 ns/iter (± 136325) 44088283 ns/iter (± 539654) 0.99
html/minify/document_fragment/github 17731588 ns/iter (± 25099) 17837422 ns/iter (± 439133) 0.99
html/minify/document_fragment/stackoverflow 16155536 ns/iter (± 12278) 16152177 ns/iter (± 50919) 1.00
html/document/visitor/compare/clone 161736 ns/iter (± 977) 168266 ns/iter (± 1503) 0.96
html/document/visitor/compare/visit_mut_span 180865 ns/iter (± 1597) 186163 ns/iter (± 1193) 0.97
html/document/visitor/compare/visit_mut_span_panic 186157 ns/iter (± 7078) 190852 ns/iter (± 1192) 0.98
html/document/visitor/compare/fold_span 231601 ns/iter (± 1969) 235981 ns/iter (± 1505) 0.98
html/document/visitor/compare/fold_span_panic 279870 ns/iter (± 799) 282953 ns/iter (± 1887) 0.99
html/document_fragment/visitor/compare/clone 165609 ns/iter (± 930) 171859 ns/iter (± 1466) 0.96
html/document_fragment/visitor/compare/visit_mut_span 178842 ns/iter (± 1142) 187762 ns/iter (± 1777) 0.95
html/document_fragment/visitor/compare/visit_mut_span_panic 185962 ns/iter (± 1226) 191359 ns/iter (± 1343) 0.97
html/document_fragment/visitor/compare/fold_span 230181 ns/iter (± 978) 234383 ns/iter (± 1955) 0.98
html/document_fragment/visitor/compare/fold_span_panic 278692 ns/iter (± 1578) 283255 ns/iter (± 1512) 0.98
html/lexer/css_2021_spec 12891237 ns/iter (± 12905) 12879102 ns/iter (± 54777) 1.00
html/lexer/github_com_17_05_2022 4954055 ns/iter (± 7199) 4924895 ns/iter (± 7833) 1.01
html/lexer/stackoverflow_com_17_05_2022 4679667 ns/iter (± 25926) 4688996 ns/iter (± 127424) 1.00
html/parser/parser_document/css_2021_spec 25582698 ns/iter (± 184010) 25624559 ns/iter (± 200238) 1.00
html/parser/parser_document/github_com_17_05_2022 8578570 ns/iter (± 73553) 8470308 ns/iter (± 14103) 1.01
html/parser/parser_document/stackoverflow_com_17_05_2022 7397852 ns/iter (± 13320) 7481381 ns/iter (± 14122) 0.99
html/parser/parser_document_fragment/css_2021_spec 25038692 ns/iter (± 186485) 25280391 ns/iter (± 76664) 0.99
html/parser/parser_document_fragment/github_com_17_05_2022 8582789 ns/iter (± 37470) 8430956 ns/iter (± 37717) 1.02
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022 7346312 ns/iter (± 10543) 7429603 ns/iter (± 20206) 0.99

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

Please sign in to comment.