Skip to content

Commit

Permalink
refactor(es/typescript): Reimplement TypeScript pass (#7202)
Browse files Browse the repository at this point in the history
**Description:**

## Bugfixes
- Exported `let`/`var` declarations in TypeScript namespaces should be mutable.
- Fix missing declaration of complex exported patterns in TypeScript namespaces.
- Preserve concrete TS namespaces.

## New Features
- Introducing [Verbatim Module Syntax](https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax).
- Enum value will now be inlined whenever possible within a single module, optimizing runtime performance.
- Constant enums will be automatically eliminated when feasible, This can reduce bundle size.
- Added support for cross-referencing enum values.

## Deprecated
`TsEnumConfig` is deprecated
  - The `treat_const_enum_as_enum` transform option is deprecated.
  - The `ts_enum_is_readonly` assumption option is deprecated.

**BREAKING CHANGE:**

TypeScript Config is changed.


**Related issue:**

 - Closes #5197
 - Closes #5259 
 - Closes #7177
 - Closes #7453
 - Closes #7676 
 - Closes #7681
 - Closes #7791 
 - Closes #7961
  • Loading branch information
magic-akari authored Sep 25, 2023
1 parent bea10ef commit 9c9a538
Show file tree
Hide file tree
Showing 542 changed files with 5,285 additions and 5,873 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions bindings/binding_core_wasm/__tests__/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ describe("parse", () => {
"optional": false,
"span": Object {
"ctxt": 2,
"end": 394,
"start": 391,
"end": 289,
"start": 286,
},
"type": "Identifier",
"value": "Foo",
Expand All @@ -119,8 +119,8 @@ describe("parse", () => {
"isAbstract": false,
"span": Object {
"ctxt": 0,
"end": 397,
"start": 385,
"end": 292,
"start": 280,
},
"superClass": null,
"superTypeParams": null,
Expand All @@ -131,8 +131,8 @@ describe("parse", () => {
"interpreter": null,
"span": Object {
"ctxt": 0,
"end": 397,
"start": 385,
"end": 292,
"start": 280,
},
"type": "Module",
}
Expand All @@ -156,8 +156,8 @@ describe("parse", () => {
"optional": false,
"span": Object {
"ctxt": 2,
"end": 407,
"start": 404,
"end": 302,
"start": 299,
},
"type": "Identifier",
"value": "Foo",
Expand All @@ -166,8 +166,8 @@ describe("parse", () => {
"isAbstract": false,
"span": Object {
"ctxt": 0,
"end": 410,
"start": 398,
"end": 305,
"start": 293,
},
"superClass": null,
"superTypeParams": null,
Expand All @@ -178,8 +178,8 @@ describe("parse", () => {
"interpreter": null,
"span": Object {
"ctxt": 0,
"end": 410,
"start": 398,
"end": 305,
"start": 293,
},
"type": "Module",
}
Expand Down
25 changes: 15 additions & 10 deletions crates/swc/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ use swc_ecma_transforms::{
},
react::{self, default_pragma, default_pragma_frag},
resolver,
typescript::{self, TsEnumConfig, TsImportExportAssignConfig},
typescript::{self, TsImportExportAssignConfig},
Assumptions,
};
use swc_ecma_transforms_compat::es2015::regenerator;
Expand Down Expand Up @@ -618,6 +618,8 @@ impl Options {
_ => TsImportExportAssignConfig::Classic,
};

let verbatim_module_syntax = transform.verbatim_module_syntax.into_bool();

let charset = cfg.jsc.output.charset.or_else(|| {
if js_minify.as_ref()?.format.ascii_only {
Some(OutputCharset::Ascii)
Expand Down Expand Up @@ -803,9 +805,14 @@ impl Options {
// keep_import_assertions is false.
Optional::new(import_assertions(), !keep_import_attributes),
Optional::new(
typescript::strip_with_jsx::<Option<&dyn Comments>>(
typescript::tsx::<Option<&dyn Comments>>(
cm.clone(),
typescript::Config {
import_export_assign_config,
verbatim_module_syntax,
..Default::default()
},
typescript::TsxConfig {
pragma: Some(
transform
.react
Expand All @@ -820,14 +827,6 @@ impl Options {
.clone()
.unwrap_or_else(default_pragma_frag)
),
ts_enum_config: TsEnumConfig {
treat_const_enum_as_enum: transform
.treat_const_enum_as_enum
.into_bool(),
ts_enum_is_readonly: assumptions.ts_enum_is_readonly,
},
import_export_assign_config,
..Default::default()
},
comments.map(|v| v as _),
top_level_mark
Expand Down Expand Up @@ -1722,11 +1721,17 @@ pub struct TransformConfig {
pub regenerator: regenerator::Config,

#[serde(default)]
#[deprecated]
pub treat_const_enum_as_enum: BoolConfig<false>,

/// https://www.typescriptlang.org/tsconfig#useDefineForClassFields
#[serde(default)]
pub use_define_for_class_fields: BoolConfig<true>,

/// https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax
#[serde(default)]
pub verbatim_module_syntax: BoolConfig<false>,

#[serde(default)]
pub decorator_version: Option<DecoratorVersion>,
}
Expand Down
5 changes: 5 additions & 0 deletions crates/swc/tests/errors/module/esnext/import-assign/input.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import homura = require("homura");

export import madoka = require("madoka");



// avoid unused import be stripped
export { homura };
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@
2 |
3 | export import madoka = require("madoka");
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4 |
5 |
`----
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ServiceError extends Error {
_define_property._(this, "name", "ServiceError.BadResponse");
}
}
(function(ServiceError1) {
(function(ServiceError) {
let Code;
(function(Code) {
Code[Code["serviceNotFound"] = 404] = "serviceNotFound";
Expand All @@ -26,7 +26,7 @@ class ServiceError extends Error {
Code[Code["timedOut"] = 504] = "timedOut";
Code[Code["badRequest"] = 400] = "badRequest";
Code[Code["badResponse"] = 422] = "badResponse";
})(Code = ServiceError1.Code || (ServiceError1.Code = {}));
})(Code = ServiceError.Code || (ServiceError.Code = {}));
class ServiceNotFound extends ServiceError {
constructor(...args){
super(...args);
Expand All @@ -35,11 +35,11 @@ class ServiceError extends Error {
_define_property._(this, "name", "ServiceError.ServiceNotFound");
}
}
ServiceError1.ServiceNotFound = ServiceNotFound;
ServiceError.ServiceNotFound = ServiceNotFound;
function toMessageBody(error) {
return {
code: ServiceError.Code.implementation
};
}
ServiceError1.toMessageBody = toMessageBody;
ServiceError.toMessageBody = toMessageBody;
})(ServiceError || (ServiceError = {}));
2 changes: 1 addition & 1 deletion crates/swc/tests/fixture/issues-2xxx/2423/output/index.map
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"mappings": ";AAAA,IAAUA;;QACOC,MAAAA,IAAI;IACV,SAASC;QACZC,QAAQC,GAAG,CAACH;IAChB;MAFgBC,IAAAA;GAFVF,MAAAA",
"mappings": ";;UAAUA;IACC,MAAMC,MAAAA,IAAI;IACV,SAASC;QACZC,QAAQC,GAAG,CAACH;IAChB;MAFgBC,IAAAA;AAGpB,GALUF,MAAAA",
"names": [
"A",
"v",
Expand Down
2 changes: 1 addition & 1 deletion crates/swc/tests/fixture/issues-2xxx/2423/output/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
var A;
(function(A) {
var v = A.v = 25;
const v = A.v = 25;
function a() {
console.log(v);
}
Expand Down
4 changes: 2 additions & 2 deletions crates/swc/tests/fixture/issues-3xxx/3073/1/output/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var n;
(function(n) {
var ref;
ref = {
var a = (ref = {
a: 1
}, n.a = ref.a, ref;
}, n.a = ref.a, ref).a;
})(n || (n = {}));
4 changes: 2 additions & 2 deletions crates/swc/tests/fixture/issues-3xxx/3073/2/output/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var Foo;
(function(Foo) {
var ref;
ref = {
var _ref = (ref = {
a: 1,
b: 2
}, Foo.A = ref.a, Foo.B = ref.b, ref;
}, Foo.A = ref.a, Foo.B = ref.b, ref), A = _ref.a, B = _ref.b;
})(Foo || (Foo = {}));
8 changes: 4 additions & 4 deletions crates/swc/tests/fixture/issues-3xxx/3686/1/output/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ _ts_decorate._([
ServiceError = _ts_decorate._([
CD
], ServiceError);
(function(ServiceError1) {
(function(ServiceError) {
let Code;
(function(Code) {
Code[Code["serviceNotFound"] = 404] = "serviceNotFound";
Expand All @@ -31,17 +31,17 @@ ServiceError = _ts_decorate._([
Code[Code["timedOut"] = 504] = "timedOut";
Code[Code["badRequest"] = 400] = "badRequest";
Code[Code["badResponse"] = 422] = "badResponse";
})(Code = ServiceError1.Code || (ServiceError1.Code = {}));
})(Code = ServiceError.Code || (ServiceError.Code = {}));
class ServiceNotFound extends ServiceError {
// Service was probably not registered, or using the wrong channel
code = 404;
name = "ServiceError.ServiceNotFound";
}
ServiceError1.ServiceNotFound = ServiceNotFound;
ServiceError.ServiceNotFound = ServiceNotFound;
function toMessageBody(error) {
return {
code: ServiceError.Code.implementation
};
}
ServiceError1.toMessageBody = toMessageBody;
ServiceError.toMessageBody = toMessageBody;
})(ServiceError || (ServiceError = {}));
10 changes: 5 additions & 5 deletions crates/swc/tests/fixture/issues-4xxx/4108/1/output/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function _sendTransactionsWithManualRetry() {
case 4:
return [
4,
sendTransactions(connection, wallet, instructions, filteredSigners, SequenceType.StopOnFailure, "single")
sendTransactions(connection, wallet, instructions, filteredSigners, 2, "single")
];
case 5:
txs = _state.sent().txs;
Expand Down Expand Up @@ -196,7 +196,7 @@ export var sendTransactions = function() {
connection: connection,
signedTransaction: signedTxns[i1]
});
if (!(sequenceType !== SequenceType.Parallel)) return [
if (!(sequenceType !== 1)) return [
3,
7
];
Expand Down Expand Up @@ -227,7 +227,7 @@ export var sendTransactions = function() {
console.log("Failed at txn index:", i1);
console.log("Caught failure:", e);
failCallback(signedTxns[i1], i1);
if (!(sequenceType === SequenceType.StopOnFailure)) return [
if (!(sequenceType === 2)) return [
3,
5
];
Expand Down Expand Up @@ -264,7 +264,7 @@ export var sendTransactions = function() {
}
});
};
sequenceType = _arguments.length > 4 && _arguments[4] !== void 0 ? _arguments[4] : SequenceType.Parallel, commitment = _arguments.length > 5 && _arguments[5] !== void 0 ? _arguments[5] : "singleGossip", successCallback = _arguments.length > 6 && _arguments[6] !== void 0 ? _arguments[6] : function(txid, ind) {}, failCallback = _arguments.length > 7 && _arguments[7] !== void 0 ? _arguments[7] : function(txid, ind) {
sequenceType = _arguments.length > 4 && _arguments[4] !== void 0 ? _arguments[4] : 1, commitment = _arguments.length > 5 && _arguments[5] !== void 0 ? _arguments[5] : "singleGossip", successCallback = _arguments.length > 6 && _arguments[6] !== void 0 ? _arguments[6] : function(txid, ind) {}, failCallback = _arguments.length > 7 && _arguments[7] !== void 0 ? _arguments[7] : function(txid, ind) {
return false;
}, block = _arguments.length > 8 ? _arguments[8] : void 0, beforeTransactions = _arguments.length > 9 && _arguments[9] !== void 0 ? _arguments[9] : [], afterTransactions = _arguments.length > 10 && _arguments[10] !== void 0 ? _arguments[10] : [];
if (!wallet.publicKey) throw new WalletNotConnectedError();
Expand Down Expand Up @@ -327,7 +327,7 @@ export var sendTransactions = function() {
4
];
case 7:
if (!(sequenceType !== SequenceType.Parallel)) return [
if (!(sequenceType !== 1)) return [
3,
9
];
Expand Down
2 changes: 1 addition & 1 deletion crates/swc/tests/fixture/issues-4xxx/4897/output/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ define([
}
var Foo;
(function(Foo) {
var Bar = Foo.Bar = 1234;
const Bar = Foo.Bar = 1234;
})(Foo || (Foo = {}));
});
2 changes: 1 addition & 1 deletion crates/swc/tests/fixture/issues-4xxx/4988/output/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Object.defineProperty(exports, "flakySuite", {
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _testUtils = /*#__PURE__*/ _interop_require_wildcard._(require("vs/base/test/common/testUtils"));
var flakySuite = _testUtils.flakySuite;
const flakySuite = _testUtils.flakySuite;
6 changes: 3 additions & 3 deletions crates/swc/tests/fixture/issues-6xxx/6791/1/output/input.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
var l;
import { test as o } from "test";
(l || (l = {})).Hello = "World!", o(l.Hello);
var o;
import { test as r } from "test";
(o || (o = {})).Hello = "World!", r("World!");
8 changes: 8 additions & 0 deletions crates/swc/tests/fixture/issues-7xxx/7681/input/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
enum Foo {
a,
b = 1,
c = Foo["a"],
d = Foo.a,
e,
f,
}
9 changes: 9 additions & 0 deletions crates/swc/tests/fixture/issues-7xxx/7681/output/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var Foo;
(function(Foo) {
Foo[Foo["a"] = 0] = "a";
Foo[Foo["b"] = 1] = "b";
Foo[Foo["c"] = 0] = "c";
Foo[Foo["d"] = 0] = "d";
Foo[Foo["e"] = 1] = "e";
Foo[Foo["f"] = 2] = "f";
})(Foo || (Foo = {}));
8 changes: 8 additions & 0 deletions crates/swc/tests/fixture/issues-7xxx/7791/input/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"jsc": {
"parser": {
"syntax": "typescript"
},
"target": "es5"
}
}
2 changes: 2 additions & 0 deletions crates/swc/tests/fixture/issues-7xxx/7791/input/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
a?.b!.c ?? 0;
a?.b.c ?? 0;
5 changes: 5 additions & 0 deletions crates/swc/tests/fixture/issues-7xxx/7791/output/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var _a, _a1;
var _a_b_c;
(_a_b_c = (_a = a) === null || _a === void 0 ? void 0 : _a.b.c) !== null && _a_b_c !== void 0 ? _a_b_c : 0;
var _a_b_c1;
(_a_b_c1 = (_a1 = a) === null || _a1 === void 0 ? void 0 : _a1.b.c) !== null && _a_b_c1 !== void 0 ? _a_b_c1 : 0;

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

1 comment on commit 9c9a538

@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: 9c9a538 Previous: f374ad9 Ratio
es/full/bugs-1 286527 ns/iter (± 5545) 293552 ns/iter (± 6825) 0.98
es/full/minify/libraries/antd 1341640931 ns/iter (± 19093820) 1306377147 ns/iter (± 5472389) 1.03
es/full/minify/libraries/d3 293412364 ns/iter (± 6721225) 275046135 ns/iter (± 1954536) 1.07
es/full/minify/libraries/echarts 1099869856 ns/iter (± 53101563) 1036811585 ns/iter (± 6322032) 1.06
es/full/minify/libraries/jquery 84574471 ns/iter (± 577717) 83704918 ns/iter (± 108235) 1.01
es/full/minify/libraries/lodash 97899239 ns/iter (± 1258337) 96725772 ns/iter (± 252292) 1.01
es/full/minify/libraries/moment 49796489 ns/iter (± 236662) 49482003 ns/iter (± 52191) 1.01
es/full/minify/libraries/react 18034686 ns/iter (± 93862) 17913875 ns/iter (± 17722) 1.01
es/full/minify/libraries/terser 219916203 ns/iter (± 2202834) 215942917 ns/iter (± 682956) 1.02
es/full/minify/libraries/three 394051997 ns/iter (± 10217188) 382573841 ns/iter (± 1413844) 1.03
es/full/minify/libraries/typescript 2650637010 ns/iter (± 46296548) 2618712391 ns/iter (± 7326268) 1.01
es/full/minify/libraries/victory 560046547 ns/iter (± 5743602) 560406056 ns/iter (± 2834930) 1.00
es/full/minify/libraries/vue 118651680 ns/iter (± 655484) 118715984 ns/iter (± 317889) 1.00
es/full/codegen/es3 33980 ns/iter (± 75) 34660 ns/iter (± 146) 0.98
es/full/codegen/es5 34051 ns/iter (± 140) 34739 ns/iter (± 172) 0.98
es/full/codegen/es2015 33984 ns/iter (± 69) 34522 ns/iter (± 143) 0.98
es/full/codegen/es2016 33977 ns/iter (± 40) 34748 ns/iter (± 83) 0.98
es/full/codegen/es2017 34021 ns/iter (± 95) 34722 ns/iter (± 50) 0.98
es/full/codegen/es2018 33986 ns/iter (± 40) 34675 ns/iter (± 78) 0.98
es/full/codegen/es2019 33891 ns/iter (± 67) 34708 ns/iter (± 120) 0.98
es/full/codegen/es2020 34001 ns/iter (± 83) 34699 ns/iter (± 123) 0.98
es/full/all/es3 166383207 ns/iter (± 1472751) 169383833 ns/iter (± 721764) 0.98
es/full/all/es5 158443828 ns/iter (± 737774) 160125474 ns/iter (± 904295) 0.99
es/full/all/es2015 118069357 ns/iter (± 871648) 119614949 ns/iter (± 625762) 0.99
es/full/all/es2016 116543165 ns/iter (± 631312) 118854468 ns/iter (± 505098) 0.98
es/full/all/es2017 116418721 ns/iter (± 845104) 117495624 ns/iter (± 638372) 0.99
es/full/all/es2018 114508582 ns/iter (± 458995) 115843801 ns/iter (± 956547) 0.99
es/full/all/es2019 113596221 ns/iter (± 959347) 115920218 ns/iter (± 647243) 0.98
es/full/all/es2020 109155796 ns/iter (± 589614) 111650714 ns/iter (± 922413) 0.98
es/full/parser 489947 ns/iter (± 5387) 489634 ns/iter (± 6226) 1.00
es/full/base/fixer 18742 ns/iter (± 114) 19788 ns/iter (± 161) 0.95
es/full/base/resolver_and_hygiene 80005 ns/iter (± 122) 81961 ns/iter (± 198) 0.98
serialization of serde 295 ns/iter (± 2) 299 ns/iter (± 0) 0.99
css/minify/libraries/bootstrap 28776211 ns/iter (± 81619) 28177692 ns/iter (± 85813) 1.02
css/visitor/compare/clone 1668480 ns/iter (± 3981) 1648220 ns/iter (± 5036) 1.01
css/visitor/compare/visit_mut_span 1794898 ns/iter (± 6867) 1772518 ns/iter (± 2520) 1.01
css/visitor/compare/visit_mut_span_panic 1856908 ns/iter (± 4355) 1859227 ns/iter (± 5126) 1.00
css/visitor/compare/fold_span 2571687 ns/iter (± 4958) 2578936 ns/iter (± 9817) 1.00
css/visitor/compare/fold_span_panic 2766270 ns/iter (± 5415) 2766172 ns/iter (± 17633) 1.00
css/lexer/bootstrap_5_1_3 4447858 ns/iter (± 62280) 4481426 ns/iter (± 3728) 0.99
css/lexer/foundation_6_7_4 3730032 ns/iter (± 3213) 3770026 ns/iter (± 2720) 0.99
css/lexer/tailwind_3_1_1 708597 ns/iter (± 1175) 714686 ns/iter (± 347) 0.99
css/parser/bootstrap_5_1_3 19669470 ns/iter (± 136352) 18876605 ns/iter (± 38484) 1.04
css/parser/foundation_6_7_4 15505757 ns/iter (± 21530) 15082635 ns/iter (± 9312) 1.03
css/parser/tailwind_3_1_1 2994202 ns/iter (± 12327) 2945426 ns/iter (± 6443) 1.02
es/codegen/colors 728304 ns/iter (± 397026) 726509 ns/iter (± 396235) 1.00
es/codegen/large 3140497 ns/iter (± 1668389) 3133282 ns/iter (± 1661616) 1.00
es/codegen/with-parser/colors 45945 ns/iter (± 151) 45784 ns/iter (± 212) 1.00
es/codegen/with-parser/large 488320 ns/iter (± 1941) 491523 ns/iter (± 1384) 0.99
es/minify/libraries/antd 1169279324 ns/iter (± 11911837) 1121476543 ns/iter (± 8253898) 1.04
es/minify/libraries/d3 239568363 ns/iter (± 724527) 237150045 ns/iter (± 340147) 1.01
es/minify/libraries/echarts 913752172 ns/iter (± 7013231) 884520093 ns/iter (± 4594801) 1.03
es/minify/libraries/jquery 73124786 ns/iter (± 116031) 73166920 ns/iter (± 162527) 1.00
es/minify/libraries/lodash 86888778 ns/iter (± 284513) 86751578 ns/iter (± 350386) 1.00
es/minify/libraries/moment 43506211 ns/iter (± 233667) 43434102 ns/iter (± 155304) 1.00
es/minify/libraries/react 16121215 ns/iter (± 66914) 16020031 ns/iter (± 20186) 1.01
es/minify/libraries/terser 186889237 ns/iter (± 456077) 185116156 ns/iter (± 375099) 1.01
es/minify/libraries/three 324745845 ns/iter (± 1383546) 318479399 ns/iter (± 990098) 1.02
es/minify/libraries/typescript 2272065915 ns/iter (± 13673506) 2215717565 ns/iter (± 10738100) 1.03
es/minify/libraries/victory 475592222 ns/iter (± 2969781) 463531919 ns/iter (± 1090321) 1.03
es/minify/libraries/vue 106491397 ns/iter (± 473568) 105782218 ns/iter (± 107360) 1.01
es/visitor/compare/clone 1963025 ns/iter (± 7720) 1971666 ns/iter (± 2162) 1.00
es/visitor/compare/visit_mut_span 2300835 ns/iter (± 5399) 2328279 ns/iter (± 4447) 0.99
es/visitor/compare/visit_mut_span_panic 2333279 ns/iter (± 5796) 2362204 ns/iter (± 3616) 0.99
es/visitor/compare/fold_span 3379509 ns/iter (± 5730) 3400907 ns/iter (± 6290) 0.99
es/visitor/compare/fold_span_panic 3540958 ns/iter (± 4690) 3565861 ns/iter (± 5182) 0.99
es/lexer/colors 13175 ns/iter (± 8) 13154 ns/iter (± 12) 1.00
es/lexer/angular 6117668 ns/iter (± 23100) 6117060 ns/iter (± 5373) 1.00
es/lexer/backbone 789538 ns/iter (± 786) 793721 ns/iter (± 1399) 0.99
es/lexer/jquery 4507316 ns/iter (± 12594) 4492175 ns/iter (± 9795) 1.00
es/lexer/jquery mobile 6872445 ns/iter (± 5580) 6852671 ns/iter (± 2025) 1.00
es/lexer/mootools 3583795 ns/iter (± 7054) 3571059 ns/iter (± 9285) 1.00
es/lexer/underscore 673089 ns/iter (± 1681) 664624 ns/iter (± 809) 1.01
es/lexer/three 21577969 ns/iter (± 32159) 21367964 ns/iter (± 12889) 1.01
es/lexer/yui 3851062 ns/iter (± 4856) 3821564 ns/iter (± 1742) 1.01
es/parser/colors 27706 ns/iter (± 402) 27125 ns/iter (± 633) 1.02
es/parser/angular 13679330 ns/iter (± 56353) 13461242 ns/iter (± 67156) 1.02
es/parser/backbone 2010213 ns/iter (± 9704) 1968295 ns/iter (± 8467) 1.02
es/parser/jquery 10946093 ns/iter (± 45235) 10794743 ns/iter (± 31748) 1.01
es/parser/jquery mobile 16701337 ns/iter (± 85625) 16504569 ns/iter (± 58329) 1.01
es/parser/mootools 8441850 ns/iter (± 17658) 8308914 ns/iter (± 14836) 1.02
es/parser/underscore 1731040 ns/iter (± 12258) 1694839 ns/iter (± 10749) 1.02
es/parser/three 47350773 ns/iter (± 179302) 46133111 ns/iter (± 136020) 1.03
es/parser/yui 8392786 ns/iter (± 32339) 8206119 ns/iter (± 27047) 1.02
es/preset-env/usage/builtin_type 137660 ns/iter (± 32599) 136340 ns/iter (± 32102) 1.01
es/preset-env/usage/property 17059 ns/iter (± 45) 17182 ns/iter (± 59) 0.99
es/resolver/typescript 90567224 ns/iter (± 1801288) 89472515 ns/iter (± 1006854) 1.01
es/fixer/typescript 64449697 ns/iter (± 1977461) 63820888 ns/iter (± 248943) 1.01
es/hygiene/typescript 131589918 ns/iter (± 711874) 129745748 ns/iter (± 507399) 1.01
es/resolver_with_hygiene/typescript 242453713 ns/iter (± 991759) 240447449 ns/iter (± 636516) 1.01
es/visitor/base-perf/module_clone 58617 ns/iter (± 520) 58817 ns/iter (± 207) 1.00
es/visitor/base-perf/fold_empty 62776 ns/iter (± 377) 63527 ns/iter (± 233) 0.99
es/visitor/base-perf/fold_noop_impl_all 62842 ns/iter (± 310) 63130 ns/iter (± 760) 1.00
es/visitor/base-perf/fold_noop_impl_vec 62662 ns/iter (± 175) 63251 ns/iter (± 250) 0.99
es/visitor/base-perf/boxing_boxed_clone 56 ns/iter (± 0) 56 ns/iter (± 0) 1
es/visitor/base-perf/boxing_unboxed_clone 39 ns/iter (± 0) 41 ns/iter (± 0) 0.95
es/visitor/base-perf/boxing_boxed 110 ns/iter (± 0) 109 ns/iter (± 0) 1.01
es/visitor/base-perf/boxing_unboxed 77 ns/iter (± 0) 77 ns/iter (± 0) 1
es/visitor/base-perf/visit_empty 0 ns/iter (± 0) 0 ns/iter (± 0) NaN
es/visitor/base-perf/visit_contains_this 2523 ns/iter (± 25) 2531 ns/iter (± 12) 1.00
es/base/parallel/resolver/typescript 3864096578 ns/iter (± 267759037) 4396654612 ns/iter (± 303804904) 0.88
es/base/parallel/hygiene/typescript 1480515213 ns/iter (± 10855884) 1450786205 ns/iter (± 6942120) 1.02
misc/visitors/time-complexity/time 5 150 ns/iter (± 0) 150 ns/iter (± 0) 1
misc/visitors/time-complexity/time 10 324 ns/iter (± 4) 439 ns/iter (± 2) 0.74
misc/visitors/time-complexity/time 15 878 ns/iter (± 0) 798 ns/iter (± 1) 1.10
misc/visitors/time-complexity/time 20 1283 ns/iter (± 30) 1284 ns/iter (± 7) 1.00
misc/visitors/time-complexity/time 40 4363 ns/iter (± 2) 4340 ns/iter (± 51) 1.01
misc/visitors/time-complexity/time 60 9032 ns/iter (± 18) 8998 ns/iter (± 14) 1.00

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

Please sign in to comment.