-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
148 changed files
with
4,307 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
crates/swc_ecma_transforms_proposal/scripts/split-decorator-tests.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import typescript from 'typescript' | ||
import fs from 'fs' | ||
import module from 'module' | ||
|
||
const require = module.createRequire(import.meta.url) | ||
const ts = fs.readFileSync('./tests/decorator-tests/decorator-tests.ts', 'utf8') | ||
|
||
// Convert TypeScript to JavaScript for testing JavaScript VMs | ||
console.log('Converting TypeScript to JavaScript...') | ||
|
||
const program = typescript.createProgram({ | ||
rootNames: ['./tests/decorator-tests/decorator-tests.ts'], | ||
options: { target: typescript.ScriptTarget.ESNext } | ||
}); | ||
// console.log('program', program) | ||
const mainFile = program.getSourceFile('./tests/decorator-tests/decorator-tests.ts') | ||
// console.log('mainFile', mainFile) | ||
|
||
const testVarStmt = mainFile.statements.find((s) => s.kind === typescript.SyntaxKind.VariableStatement) | ||
// console.log('testVarStmt', testVarStmt) | ||
|
||
const testVarDecl = testVarStmt.declarationList.declarations[0] | ||
// console.log('testVarDecl', testVarDecl) | ||
|
||
const properties = testVarDecl.initializer.properties | ||
// console.log('properties', properties) | ||
|
||
fs.mkdirSync(`tests/decorator-evanw-split`, { recursive: true }); | ||
|
||
for (const property of properties) { | ||
let name = property.name.getText(mainFile) | ||
const value = property.initializer.getText(mainFile) | ||
|
||
name = name.replace(/'/g, '') | ||
|
||
// console.log('name', name) | ||
// console.log('value', value) | ||
|
||
const code = `(${value})()`; | ||
const transpiiled = typescript.transpile(code, { target: typescript.ScriptTarget.ESNext }) | ||
|
||
fs.writeFileSync(`tests/decorator-evanw-split/${name}.js`, transpiiled) | ||
} | ||
|
37 changes: 37 additions & 0 deletions
37
...l/tests/decorator-evanw-split/Auto-accessor decorators: Basic (instance auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
(() => { | ||
const dec = (key, getName, setName) => (target, ctx) => { | ||
assertEq(() => typeof target.get, 'function'); | ||
assertEq(() => typeof target.set, 'function'); | ||
assertEq(() => target.get.name, getName); | ||
assertEq(() => target.set.name, setName); | ||
assertEq(() => ctx.kind, 'accessor'); | ||
assertEq(() => ctx.name, key); | ||
assertEq(() => ctx.static, false); | ||
assertEq(() => ctx.private, false); | ||
assertEq(() => ctx.access.has({ [key]: false }), true); | ||
assertEq(() => ctx.access.has({ bar: true }), false); | ||
assertEq(() => ctx.access.get({ [key]: 123 }), 123); | ||
assertEq(() => { | ||
const obj = {}; | ||
ctx.access.set(obj, 123); | ||
return obj[key]; | ||
}, 123); | ||
}; | ||
const bar = Symbol('bar'); | ||
const baz = Symbol(); | ||
class Foo { | ||
@dec('foo', 'get foo', 'set foo') | ||
accessor foo = 0; | ||
@dec(bar, 'get [bar]', 'set [bar]') | ||
accessor [bar] = 0; | ||
@dec(baz, 'get ', 'set ') | ||
accessor [baz] = 0; | ||
} | ||
var obj = new Foo; | ||
obj.foo = 321; | ||
assertEq(() => obj.foo, 321); | ||
obj[bar] = 4321; | ||
assertEq(() => obj[bar], 4321); | ||
obj[baz] = 54321; | ||
assertEq(() => obj[baz], 54321); | ||
})(); |
37 changes: 37 additions & 0 deletions
37
...decorator-evanw-split/Auto-accessor decorators: Basic (private instance auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
(() => { | ||
let lateAsserts; | ||
const dec = (target, ctx) => { | ||
assertEq(() => typeof target.get, 'function'); | ||
assertEq(() => typeof target.set, 'function'); | ||
assertEq(() => target.get.name, 'get #foo'); | ||
assertEq(() => target.set.name, 'set #foo'); | ||
assertEq(() => ctx.kind, 'accessor'); | ||
assertEq(() => ctx.name, '#foo'); | ||
assertEq(() => ctx.static, false); | ||
assertEq(() => ctx.private, true); | ||
lateAsserts = () => { | ||
assertEq(() => ctx.access.has(new Foo), true); | ||
assertEq(() => ctx.access.has({}), false); | ||
assertEq(() => ctx.access.get(new Foo), 0); | ||
assertEq(() => { | ||
const obj = new Foo; | ||
ctx.access.set(obj, 123); | ||
return get$foo(obj); | ||
}, 123); | ||
}; | ||
}; | ||
let get$foo; | ||
let set$foo; | ||
class Foo { | ||
@dec | ||
accessor #foo = 0; | ||
static { | ||
get$foo = x => x.#foo; | ||
set$foo = (x, y) => { x.#foo = y; }; | ||
} | ||
} | ||
lateAsserts(); | ||
var obj = new Foo; | ||
assertEq(() => set$foo(obj, 321), undefined); | ||
assertEq(() => get$foo(obj), 321); | ||
})(); |
35 changes: 35 additions & 0 deletions
35
...s/decorator-evanw-split/Auto-accessor decorators: Basic (private static auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
(() => { | ||
let lateAsserts; | ||
const dec = (target, ctx) => { | ||
assertEq(() => typeof target.get, 'function'); | ||
assertEq(() => typeof target.set, 'function'); | ||
assertEq(() => target.get.name, 'get #foo'); | ||
assertEq(() => target.set.name, 'set #foo'); | ||
assertEq(() => ctx.kind, 'accessor'); | ||
assertEq(() => ctx.name, '#foo'); | ||
assertEq(() => ctx.static, true); | ||
assertEq(() => ctx.private, true); | ||
lateAsserts = () => { | ||
assertEq(() => ctx.access.has(Foo), true); | ||
assertEq(() => ctx.access.has({}), false); | ||
assertEq(() => ctx.access.get(Foo), 0); | ||
assertEq(() => { | ||
ctx.access.set(Foo, 123); | ||
return get$foo(Foo); | ||
}, 123); | ||
}; | ||
}; | ||
let get$foo; | ||
let set$foo; | ||
class Foo { | ||
@dec | ||
static accessor #foo = 0; | ||
static { | ||
get$foo = x => x.#foo; | ||
set$foo = (x, y) => { x.#foo = y; }; | ||
} | ||
} | ||
lateAsserts(); | ||
assertEq(() => set$foo(Foo, 321), undefined); | ||
assertEq(() => get$foo(Foo), 321); | ||
})(); |
36 changes: 36 additions & 0 deletions
36
...sal/tests/decorator-evanw-split/Auto-accessor decorators: Basic (static auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
(() => { | ||
const dec = (key, getName, setName) => (target, ctx) => { | ||
assertEq(() => typeof target.get, 'function'); | ||
assertEq(() => typeof target.set, 'function'); | ||
assertEq(() => target.get.name, getName); | ||
assertEq(() => target.set.name, setName); | ||
assertEq(() => ctx.kind, 'accessor'); | ||
assertEq(() => ctx.name, key); | ||
assertEq(() => ctx.static, true); | ||
assertEq(() => ctx.private, false); | ||
assertEq(() => ctx.access.has({ [key]: false }), true); | ||
assertEq(() => ctx.access.has({ bar: true }), false); | ||
assertEq(() => ctx.access.get({ [key]: 123 }), 123); | ||
assertEq(() => { | ||
const obj = {}; | ||
ctx.access.set(obj, 123); | ||
return obj[key]; | ||
}, 123); | ||
}; | ||
const bar = Symbol('bar'); | ||
const baz = Symbol(); | ||
class Foo { | ||
@dec('foo', 'get foo', 'set foo') | ||
static accessor foo = 0; | ||
@dec(bar, 'get [bar]', 'set [bar]') | ||
static accessor [bar] = 0; | ||
@dec(baz, 'get ', 'set ') | ||
static accessor [baz] = 0; | ||
} | ||
Foo.foo = 321; | ||
assertEq(() => Foo.foo, 321); | ||
Foo[bar] = 4321; | ||
assertEq(() => Foo[bar], 4321); | ||
Foo[baz] = 54321; | ||
assertEq(() => Foo[baz], 54321); | ||
})(); |
22 changes: 22 additions & 0 deletions
22
...rator-evanw-split/Auto-accessor decorators: Extra initializer (instance auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(() => { | ||
let oldAddInitializer; | ||
let got; | ||
const dec = (target, ctx) => { | ||
ctx.addInitializer(function (...args) { | ||
got = { this: this, args }; | ||
}); | ||
if (oldAddInitializer) | ||
assertThrows(() => oldAddInitializer(() => { }), TypeError); | ||
assertThrows(() => ctx.addInitializer({}), TypeError); | ||
oldAddInitializer = ctx.addInitializer; | ||
}; | ||
class Foo { | ||
@dec | ||
@dec | ||
accessor foo; | ||
} | ||
assertEq(() => got, undefined); | ||
const instance = new Foo; | ||
assertEq(() => got.this, instance); | ||
assertEq(() => got.args.length, 0); | ||
})(); |
22 changes: 22 additions & 0 deletions
22
...anw-split/Auto-accessor decorators: Extra initializer (private instance auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(() => { | ||
let oldAddInitializer; | ||
let got; | ||
const dec = (target, ctx) => { | ||
ctx.addInitializer(function (...args) { | ||
got = { this: this, args }; | ||
}); | ||
if (oldAddInitializer) | ||
assertThrows(() => oldAddInitializer(() => { }), TypeError); | ||
assertThrows(() => ctx.addInitializer({}), TypeError); | ||
oldAddInitializer = ctx.addInitializer; | ||
}; | ||
class Foo { | ||
@dec | ||
@dec | ||
accessor #foo; | ||
} | ||
assertEq(() => got, undefined); | ||
const instance = new Foo; | ||
assertEq(() => got.this, instance); | ||
assertEq(() => got.args.length, 0); | ||
})(); |
20 changes: 20 additions & 0 deletions
20
...evanw-split/Auto-accessor decorators: Extra initializer (private static auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(() => { | ||
let oldAddInitializer; | ||
let got; | ||
const dec = (target, ctx) => { | ||
ctx.addInitializer(function (...args) { | ||
got = { this: this, args }; | ||
}); | ||
if (oldAddInitializer) | ||
assertThrows(() => oldAddInitializer(() => { }), TypeError); | ||
assertThrows(() => ctx.addInitializer({}), TypeError); | ||
oldAddInitializer = ctx.addInitializer; | ||
}; | ||
class Foo { | ||
@dec | ||
@dec | ||
static accessor #foo; | ||
} | ||
assertEq(() => got.this, Foo); | ||
assertEq(() => got.args.length, 0); | ||
})(); |
20 changes: 20 additions & 0 deletions
20
...corator-evanw-split/Auto-accessor decorators: Extra initializer (static auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(() => { | ||
let oldAddInitializer; | ||
let got; | ||
const dec = (target, ctx) => { | ||
ctx.addInitializer(function (...args) { | ||
got = { this: this, args }; | ||
}); | ||
if (oldAddInitializer) | ||
assertThrows(() => oldAddInitializer(() => { }), TypeError); | ||
assertThrows(() => ctx.addInitializer({}), TypeError); | ||
oldAddInitializer = ctx.addInitializer; | ||
}; | ||
class Foo { | ||
@dec | ||
@dec | ||
static accessor foo; | ||
} | ||
assertEq(() => got.this, Foo); | ||
assertEq(() => got.args.length, 0); | ||
})(); |
11 changes: 11 additions & 0 deletions
11
...s/decorator-evanw-split/Auto-accessor decorators: Return null (instance auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(() => { | ||
assertThrows(() => { | ||
const dec = (target, ctx) => { | ||
return null; | ||
}; | ||
class Foo { | ||
@dec | ||
accessor foo; | ||
} | ||
}, TypeError); | ||
})(); |
11 changes: 11 additions & 0 deletions
11
...tor-evanw-split/Auto-accessor decorators: Return null (private instance auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(() => { | ||
assertThrows(() => { | ||
const dec = (target, ctx) => { | ||
return null; | ||
}; | ||
class Foo { | ||
@dec | ||
accessor #foo; | ||
} | ||
}, TypeError); | ||
})(); |
11 changes: 11 additions & 0 deletions
11
...rator-evanw-split/Auto-accessor decorators: Return null (private static auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(() => { | ||
assertThrows(() => { | ||
const dec = (target, ctx) => { | ||
return null; | ||
}; | ||
class Foo { | ||
@dec | ||
static accessor #foo; | ||
} | ||
}, TypeError); | ||
})(); |
11 changes: 11 additions & 0 deletions
11
...sts/decorator-evanw-split/Auto-accessor decorators: Return null (static auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(() => { | ||
assertThrows(() => { | ||
const dec = (target, ctx) => { | ||
return null; | ||
}; | ||
class Foo { | ||
@dec | ||
static accessor foo; | ||
} | ||
}, TypeError); | ||
})(); |
23 changes: 23 additions & 0 deletions
23
...al/tests/decorator-evanw-split/Auto-accessor decorators: Shim (instance auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(() => { | ||
let get; | ||
let set; | ||
const dec = (target, ctx) => { | ||
function init(x) { | ||
assertEq(() => this instanceof Foo, true); | ||
return x + 1; | ||
} | ||
get = function () { return target.get.call(this) * 10; }; | ||
set = function (x) { target.set.call(this, x * 2); }; | ||
return { get, set, init }; | ||
}; | ||
class Foo { | ||
@dec | ||
accessor foo = 123; | ||
} | ||
assertEq(() => Object.getOwnPropertyDescriptor(Foo.prototype, 'foo').get, get); | ||
assertEq(() => Object.getOwnPropertyDescriptor(Foo.prototype, 'foo').set, set); | ||
var obj = new Foo; | ||
assertEq(() => obj.foo, (123 + 1) * 10); | ||
obj.foo = 321; | ||
assertEq(() => obj.foo, (321 * 2) * 10); | ||
})(); |
27 changes: 27 additions & 0 deletions
27
.../decorator-evanw-split/Auto-accessor decorators: Shim (private instance auto-accessor).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
(() => { | ||
let get; | ||
let set; | ||
const dec = (target, ctx) => { | ||
function init(x) { | ||
assertEq(() => this instanceof Foo, true); | ||
return x + 1; | ||
} | ||
get = function () { return target.get.call(this) * 10; }; | ||
set = function (x) { target.set.call(this, x * 2); }; | ||
return { get, set, init }; | ||
}; | ||
let get$foo; | ||
let set$foo; | ||
class Foo { | ||
@dec | ||
accessor #foo = 123; | ||
static { | ||
get$foo = x => x.#foo; | ||
set$foo = (x, y) => { x.#foo = y; }; | ||
} | ||
} | ||
var obj = new Foo; | ||
assertEq(() => get$foo(obj), (123 + 1) * 10); | ||
assertEq(() => set$foo(obj, 321), undefined); | ||
assertEq(() => get$foo(obj), (321 * 2) * 10); | ||
})(); |
Oops, something went wrong.
fc4735c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
es/full/bugs-1
292062
ns/iter (± 14026
)272335
ns/iter (± 2727
)1.07
es/full/minify/libraries/antd
1939680850
ns/iter (± 38747923
)1724835960
ns/iter (± 58060489
)1.12
es/full/minify/libraries/d3
375421980
ns/iter (± 6053850
)340045412
ns/iter (± 870659
)1.10
es/full/minify/libraries/echarts
1673538304
ns/iter (± 15854438
)1435851206
ns/iter (± 12040633
)1.17
es/full/minify/libraries/jquery
105554739
ns/iter (± 1301147
)102815548
ns/iter (± 220552
)1.03
es/full/minify/libraries/lodash
116446516
ns/iter (± 585146
)113749511
ns/iter (± 243817
)1.02
es/full/minify/libraries/moment
60434827
ns/iter (± 334339
)59522593
ns/iter (± 85565
)1.02
es/full/minify/libraries/react
18497043
ns/iter (± 94312
)18336958
ns/iter (± 29028
)1.01
es/full/minify/libraries/terser
292940305
ns/iter (± 2498100
)272388301
ns/iter (± 930541
)1.08
es/full/minify/libraries/three
515941833
ns/iter (± 9453726
)462083117
ns/iter (± 2270938
)1.12
es/full/minify/libraries/typescript
3381165543
ns/iter (± 26067903
)3202671056
ns/iter (± 22731960
)1.06
es/full/minify/libraries/victory
894375626
ns/iter (± 29377766
)719319124
ns/iter (± 6809019
)1.24
es/full/minify/libraries/vue
152943005
ns/iter (± 955335
)144947049
ns/iter (± 1063717
)1.06
es/full/codegen/es3
59156
ns/iter (± 266
)58755
ns/iter (± 206
)1.01
es/full/codegen/es5
58996
ns/iter (± 167
)58745
ns/iter (± 225
)1.00
es/full/codegen/es2015
59041
ns/iter (± 234
)58466
ns/iter (± 197
)1.01
es/full/codegen/es2016
58815
ns/iter (± 183
)58735
ns/iter (± 253
)1.00
es/full/codegen/es2017
58853
ns/iter (± 303
)58744
ns/iter (± 156
)1.00
es/full/codegen/es2018
58906
ns/iter (± 280
)58363
ns/iter (± 176
)1.01
es/full/codegen/es2019
58908
ns/iter (± 254
)58508
ns/iter (± 162
)1.01
es/full/codegen/es2020
59048
ns/iter (± 570
)58705
ns/iter (± 151
)1.01
es/full/all/es3
162675866
ns/iter (± 932399
)163424759
ns/iter (± 1005045
)1.00
es/full/all/es5
157337474
ns/iter (± 1299928
)158426007
ns/iter (± 1493677
)0.99
es/full/all/es2015
117203995
ns/iter (± 1844706
)117604551
ns/iter (± 984880
)1.00
es/full/all/es2016
116029504
ns/iter (± 751343
)116202382
ns/iter (± 946912
)1.00
es/full/all/es2017
115574002
ns/iter (± 764804
)115740294
ns/iter (± 770813
)1.00
es/full/all/es2018
113913449
ns/iter (± 770729
)113406523
ns/iter (± 1039223
)1.00
es/full/all/es2019
113438690
ns/iter (± 979015
)113354168
ns/iter (± 670419
)1.00
es/full/all/es2020
109052341
ns/iter (± 983643
)109095980
ns/iter (± 688540
)1.00
es/full/parser
481778
ns/iter (± 2512
)474232
ns/iter (± 2698
)1.02
es/full/base/fixer
15401
ns/iter (± 38
)15136
ns/iter (± 55
)1.02
es/full/base/resolver_and_hygiene
80603
ns/iter (± 172
)80537
ns/iter (± 229
)1.00
serialization of serde
263
ns/iter (± 6
)277
ns/iter (± 0
)0.95
css/minify/libraries/bootstrap
21803063
ns/iter (± 34521
)22951827
ns/iter (± 183071
)0.95
css/visitor/compare/clone
1354906
ns/iter (± 7575
)1356283
ns/iter (± 10300
)1.00
css/visitor/compare/visit_mut_span
1477108
ns/iter (± 6603
)1497859
ns/iter (± 6560
)0.99
css/visitor/compare/visit_mut_span_panic
1498681
ns/iter (± 31813
)1487081
ns/iter (± 27306
)1.01
css/visitor/compare/fold_span
1983430
ns/iter (± 3336
)1995532
ns/iter (± 7308
)0.99
css/visitor/compare/fold_span_panic
2123139
ns/iter (± 4171
)2131429
ns/iter (± 6420
)1.00
css/lexer/bootstrap_5_1_3
3523858
ns/iter (± 10967
)3522443
ns/iter (± 7434
)1.00
css/lexer/foundation_6_7_4
2826309
ns/iter (± 1100
)2832742
ns/iter (± 3005
)1.00
css/lexer/tailwind_3_1_1
548044
ns/iter (± 879
)543945
ns/iter (± 656
)1.01
css/parser/bootstrap_5_1_3
16143202
ns/iter (± 39306
)16064470
ns/iter (± 22162
)1.00
css/parser/foundation_6_7_4
12934581
ns/iter (± 26619
)12816874
ns/iter (± 17701
)1.01
css/parser/tailwind_3_1_1
2662075
ns/iter (± 4724
)2542378
ns/iter (± 12042
)1.05
es/codegen/colors
738610
ns/iter (± 397091
)728033
ns/iter (± 396832
)1.01
es/codegen/large
2965265
ns/iter (± 1605612
)2951631
ns/iter (± 1589634
)1.00
es/codegen/with-parser/colors
41467
ns/iter (± 177
)41569
ns/iter (± 341
)1.00
es/codegen/with-parser/large
452312
ns/iter (± 1933
)451960
ns/iter (± 8704
)1.00
es/minify/libraries/antd
1416091336
ns/iter (± 27447048
)1385792162
ns/iter (± 31216808
)1.02
es/minify/libraries/d3
281388501
ns/iter (± 3577704
)279026617
ns/iter (± 5042436
)1.01
es/minify/libraries/echarts
1152210106
ns/iter (± 21166133
)1126090911
ns/iter (± 6274531
)1.02
es/minify/libraries/jquery
82543899
ns/iter (± 221882
)82258672
ns/iter (± 377962
)1.00
es/minify/libraries/lodash
104703144
ns/iter (± 178255
)104162208
ns/iter (± 596914
)1.01
es/minify/libraries/moment
48446828
ns/iter (± 74408
)48195233
ns/iter (± 810318
)1.01
es/minify/libraries/react
16300467
ns/iter (± 9021
)16245445
ns/iter (± 37969
)1.00
es/minify/libraries/terser
217907504
ns/iter (± 2882035
)215329352
ns/iter (± 793154
)1.01
es/minify/libraries/three
367606034
ns/iter (± 11688541
)356934503
ns/iter (± 1487228
)1.03
es/minify/libraries/typescript
2741807158
ns/iter (± 36270389
)2658798345
ns/iter (± 19130704
)1.03
es/minify/libraries/victory
577715656
ns/iter (± 4006972
)552631217
ns/iter (± 3199814
)1.05
es/minify/libraries/vue
121647125
ns/iter (± 328151
)120792962
ns/iter (± 884874
)1.01
es/visitor/compare/clone
1699828
ns/iter (± 5927
)1708421
ns/iter (± 4013
)0.99
es/visitor/compare/visit_mut_span
2035384
ns/iter (± 22404
)2053725
ns/iter (± 14644
)0.99
es/visitor/compare/visit_mut_span_panic
2046059
ns/iter (± 26780
)2058175
ns/iter (± 28870
)0.99
es/visitor/compare/fold_span
2749257
ns/iter (± 11720
)2760493
ns/iter (± 9680
)1.00
es/visitor/compare/fold_span_panic
2795792
ns/iter (± 13482
)2802428
ns/iter (± 4424
)1.00
es/lexer/colors
9605
ns/iter (± 48
)9311
ns/iter (± 57
)1.03
es/lexer/angular
4904346
ns/iter (± 29084
)4968964
ns/iter (± 28920
)0.99
es/lexer/backbone
647288
ns/iter (± 2202
)653376
ns/iter (± 4309
)0.99
es/lexer/jquery
3792398
ns/iter (± 17561
)3597779
ns/iter (± 14281
)1.05
es/lexer/jquery mobile
5485021
ns/iter (± 14070
)5450195
ns/iter (± 51567
)1.01
es/lexer/mootools
2814040
ns/iter (± 10665
)2913494
ns/iter (± 4935
)0.97
es/lexer/underscore
519016
ns/iter (± 2484
)522349
ns/iter (± 1922
)0.99
es/lexer/three
16066998
ns/iter (± 112531
)15933031
ns/iter (± 21242
)1.01
es/lexer/yui
2959732
ns/iter (± 86378
)2906602
ns/iter (± 12942
)1.02
es/lexer/cal-com
12860915
ns/iter (± 18389
)13021787
ns/iter (± 47142
)0.99
es/lexer/typescript
90288924
ns/iter (± 205781
)90834042
ns/iter (± 405864
)0.99
es/parser/colors
23550
ns/iter (± 123
)23479
ns/iter (± 118
)1.00
es/parser/angular
12428613
ns/iter (± 47278
)12483878
ns/iter (± 61579
)1.00
es/parser/backbone
1819913
ns/iter (± 9007
)1821928
ns/iter (± 8396
)1.00
es/parser/jquery
10064030
ns/iter (± 75868
)10110040
ns/iter (± 60625
)1.00
es/parser/jquery mobile
15163048
ns/iter (± 97081
)15176476
ns/iter (± 98173
)1.00
es/parser/mootools
7843490
ns/iter (± 44931
)7864687
ns/iter (± 16477
)1.00
es/parser/underscore
1571313
ns/iter (± 8733
)1585310
ns/iter (± 6217
)0.99
es/parser/three
42904051
ns/iter (± 280033
)43598313
ns/iter (± 307769
)0.98
es/parser/yui
7404698
ns/iter (± 36293
)7414818
ns/iter (± 43494
)1.00
es/parser/cal-com
39147787
ns/iter (± 307063
)39618934
ns/iter (± 171637
)0.99
es/parser/typescript
266392463
ns/iter (± 904026
)267337264
ns/iter (± 564503
)1.00
es/preset-env/usage/builtin_type
136512
ns/iter (± 34895
)135236
ns/iter (± 34725
)1.01
es/preset-env/usage/property
16372
ns/iter (± 96
)15657
ns/iter (± 42
)1.05
es/resolver/typescript
104613862
ns/iter (± 2442881
)99957613
ns/iter (± 2883052
)1.05
es/fixer/typescript
85398291
ns/iter (± 1766747
)81017386
ns/iter (± 2302792
)1.05
es/hygiene/typescript
191315311
ns/iter (± 3225826
)183885913
ns/iter (± 6513705
)1.04
es/resolver_with_hygiene/typescript
330382299
ns/iter (± 3742757
)300836345
ns/iter (± 2682568
)1.10
es/visitor/base-perf/module_clone
57065
ns/iter (± 1980
)57427
ns/iter (± 701
)0.99
es/visitor/base-perf/fold_empty
60529
ns/iter (± 958
)61126
ns/iter (± 600
)0.99
es/visitor/base-perf/fold_noop_impl_all
60193
ns/iter (± 897
)60788
ns/iter (± 883
)0.99
es/visitor/base-perf/fold_noop_impl_vec
60317
ns/iter (± 705
)60928
ns/iter (± 400
)0.99
es/visitor/base-perf/boxing_boxed_clone
60
ns/iter (± 0
)59
ns/iter (± 0
)1.02
es/visitor/base-perf/boxing_unboxed_clone
47
ns/iter (± 0
)47
ns/iter (± 0
)1
es/visitor/base-perf/boxing_boxed
105
ns/iter (± 1
)108
ns/iter (± 0
)0.97
es/visitor/base-perf/boxing_unboxed
80
ns/iter (± 0
)80
ns/iter (± 0
)1
es/visitor/base-perf/visit_contains_this
2579
ns/iter (± 25
)2586
ns/iter (± 28
)1.00
es/base/parallel/resolver/typescript
2557646004
ns/iter (± 158125654
)2491978804
ns/iter (± 100610535
)1.03
es/base/parallel/hygiene/typescript
3183469193
ns/iter (± 44074971
)3179590068
ns/iter (± 39557995
)1.00
babelify-only
510833
ns/iter (± 11477
)496542
ns/iter (± 5838
)1.03
parse_and_babelify_angular
54293129
ns/iter (± 1845522
)39699833
ns/iter (± 2232737
)1.37
parse_and_babelify_backbone
5349470
ns/iter (± 417109
)4378453
ns/iter (± 155597
)1.22
parse_and_babelify_jquery
36576684
ns/iter (± 2175233
)28518290
ns/iter (± 498358
)1.28
parse_and_babelify_jquery_mobile
61917207
ns/iter (± 2483830
)51413647
ns/iter (± 826484
)1.20
parse_and_babelify_mootools
31982872
ns/iter (± 1084978
)26185116
ns/iter (± 706007
)1.22
parse_and_babelify_underscore
3916649
ns/iter (± 50311
)3690196
ns/iter (± 19737
)1.06
parse_and_babelify_yui
30734285
ns/iter (± 870089
)23928254
ns/iter (± 263364
)1.28
html/minify/document/css_spec
45543246
ns/iter (± 300537
)48468547
ns/iter (± 886890
)0.94
html/minify/document/github
18100097
ns/iter (± 13924
)19479785
ns/iter (± 352566
)0.93
html/minify/document/stackoverflow
16450228
ns/iter (± 533161
)17867759
ns/iter (± 438940
)0.92
html/minify/document_fragment/css_spec
45168528
ns/iter (± 183493
)47331668
ns/iter (± 283301
)0.95
html/minify/document_fragment/github
17937429
ns/iter (± 54150
)18037849
ns/iter (± 349989
)0.99
html/minify/document_fragment/stackoverflow
16386972
ns/iter (± 283152
)18064496
ns/iter (± 315318
)0.91
html/document/visitor/compare/clone
166721
ns/iter (± 3637
)163498
ns/iter (± 1061
)1.02
html/document/visitor/compare/visit_mut_span
182534
ns/iter (± 1226
)180776
ns/iter (± 751
)1.01
html/document/visitor/compare/visit_mut_span_panic
188164
ns/iter (± 2816
)184220
ns/iter (± 4237
)1.02
html/document/visitor/compare/fold_span
230693
ns/iter (± 985
)227694
ns/iter (± 1512
)1.01
html/document/visitor/compare/fold_span_panic
283257
ns/iter (± 1112
)276571
ns/iter (± 1584
)1.02
html/document_fragment/visitor/compare/clone
167369
ns/iter (± 1005
)165259
ns/iter (± 1677
)1.01
html/document_fragment/visitor/compare/visit_mut_span
181742
ns/iter (± 638
)180450
ns/iter (± 1005
)1.01
html/document_fragment/visitor/compare/visit_mut_span_panic
188766
ns/iter (± 1045
)186050
ns/iter (± 1243
)1.01
html/document_fragment/visitor/compare/fold_span
231045
ns/iter (± 1007
)227932
ns/iter (± 1219
)1.01
html/document_fragment/visitor/compare/fold_span_panic
282579
ns/iter (± 1116
)277613
ns/iter (± 718
)1.02
html/lexer/css_2021_spec
12900555
ns/iter (± 30006
)12889712
ns/iter (± 166222
)1.00
html/lexer/github_com_17_05_2022
4948918
ns/iter (± 129121
)4976380
ns/iter (± 11172
)0.99
html/lexer/stackoverflow_com_17_05_2022
4691813
ns/iter (± 3055
)4688151
ns/iter (± 10757
)1.00
html/parser/parser_document/css_2021_spec
25531025
ns/iter (± 159932
)25486561
ns/iter (± 77399
)1.00
html/parser/parser_document/github_com_17_05_2022
8533172
ns/iter (± 80992
)8489090
ns/iter (± 14441
)1.01
html/parser/parser_document/stackoverflow_com_17_05_2022
7457514
ns/iter (± 86224
)7450230
ns/iter (± 24948
)1.00
html/parser/parser_document_fragment/css_2021_spec
25794183
ns/iter (± 135929
)25043343
ns/iter (± 52490
)1.03
html/parser/parser_document_fragment/github_com_17_05_2022
8489092
ns/iter (± 25927
)8447319
ns/iter (± 15738
)1.00
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022
7488572
ns/iter (± 15642
)7488510
ns/iter (± 22899
)1.00
This comment was automatically generated by workflow using github-action-benchmark.