3
3
use std:: {
4
4
env:: current_dir,
5
5
path:: { Path , PathBuf } ,
6
+ str:: FromStr ,
6
7
} ;
7
8
8
9
use anyhow:: { Context , Error } ;
@@ -18,14 +19,9 @@ use wasmer::{Module, Store};
18
19
#[ cfg( all( not( target_arch = "wasm32" ) , feature = "filesystem_cache" ) ) ]
19
20
use wasmer_cache:: { Cache as WasmerCache , FileSystemCache , Hash } ;
20
21
21
- #[ cfg( all( not( feature = "filesystem_cache" ) , not( feature = "memory_cache" ) ) ) ]
22
- compile_error ! ( "Plugin_runner should enable either filesystem, or memory cache" ) ;
23
-
24
- #[ cfg( all( feature = "filesystem_cache" , feature = "memory_cache" ) ) ]
25
- compile_error ! (
26
- "Only one cache feature should be enabled. If you enabled filesystem_cache, it activates its \
27
- memory cache as well."
28
- ) ;
22
+ use crate :: plugin_module_bytes:: {
23
+ CompiledPluginModuleBytes , PluginModuleBytes , RawPluginModuleBytes ,
24
+ } ;
29
25
30
26
/// Version for bytecode cache stored in local filesystem.
31
27
///
@@ -37,37 +33,164 @@ compile_error!(
37
33
/// https://github.com/wasmerio/wasmer/issues/2781
38
34
const MODULE_SERIALIZATION_VERSION : & str = "v6" ;
39
35
40
- /// A shared instance to plugin's module bytecode cache.
41
- pub static PLUGIN_MODULE_CACHE : Lazy < PluginModuleCache > = Lazy :: new ( Default :: default) ;
42
-
43
- #[ cfg( feature = "filesystem_cache" ) ]
44
36
#[ derive( Default ) ]
45
- pub struct CacheInner {
46
- fs_cache : Option < FileSystemCache > ,
47
- // A naive hashmap to the compiled plugin modules.
48
- // Current it doesn't have any invalidation or expiration logics like lru,
49
- // having a lot of plugins may create some memory pressure.
50
- loaded_module_bytes : AHashMap < PathBuf , Module > ,
37
+ pub struct PluginModuleCacheInner {
38
+ #[ cfg( all( not( target_arch = "wasm32" ) , feature = "filesystem_cache" ) ) ]
39
+ fs_cache_store : Option < FileSystemCache > ,
40
+ // Stores the string representation of the hash of the plugin module to store into
41
+ // FileSystemCache. This works since SWC does not revalidates plugin in single process
42
+ // lifecycle.
43
+ #[ cfg( all( not( target_arch = "wasm32" ) , feature = "filesystem_cache" ) ) ]
44
+ fs_cache_hash_store : AHashMap < String , Hash > ,
45
+ // Generic in-memory cache to the raw bytes, either read by fs or supplied by bindgen.
46
+ memory_cache_store : AHashMap < String , Vec < u8 > > ,
47
+ /*
48
+ A naive hashmap to the compiled plugin modules.
49
+ Current it doesn't have any invalidation or expiration logics like lru,
50
+ having a lot of plugins may create some memory pressure.
51
+ [TODO]: This is currently disabled, since on the latest wasmer@3 subsequent
52
+ plugin load via in memory module causes intermittent heap_get_oob when
53
+ host tries to allocate memory inside of the guest.
54
+
55
+ Current guess is memory instance is being corrupted by the previous run, but
56
+ until figure out root cause & fix will only use fs_cache directly.
57
+ */
58
+ compiled_module_bytes : AHashMap < String , ( wasmer:: Store , wasmer:: Module ) > ,
51
59
}
52
60
53
- #[ cfg( feature = "memory_cache" ) ]
54
- #[ derive( Default ) ]
55
- pub struct CacheInner {
56
- // Unlike sys::Module, we'll keep raw bytes from the module instead of js::Module which
57
- // implies bindgen's JsValue
58
- loaded_module_bytes : AHashMap < PathBuf , Vec < u8 > > ,
61
+ impl PluginModuleCacheInner {
62
+ /// Check if the cache contains bytes for the corresponding key.
63
+ pub fn contains ( & self , key : & str ) -> bool {
64
+ let is_in_cache = self . memory_cache_store . contains_key ( key)
65
+ || self . compiled_module_bytes . contains_key ( key) ;
66
+
67
+ #[ cfg( all( not( target_arch = "wasm32" ) , feature = "filesystem_cache" ) ) ]
68
+ {
69
+ // Instead of accessing FileSystemCache, check if the key have corresponding
70
+ // hash since FileSystemCache does not have a way to check if the key
71
+ // exists.
72
+ return is_in_cache || self . fs_cache_hash_store . contains_key ( key) ;
73
+ }
74
+
75
+ is_in_cache
76
+ }
77
+
78
+ pub fn insert_raw_bytes ( & mut self , key : String , value : Vec < u8 > ) {
79
+ self . memory_cache_store . insert ( key, value) ;
80
+ }
81
+
82
+ fn insert_compiled_module_bytes (
83
+ & mut self ,
84
+ key : String ,
85
+ value : ( wasmer:: Store , wasmer:: Module ) ,
86
+ ) {
87
+ self . compiled_module_bytes . insert ( key, value) ;
88
+ }
89
+
90
+ /// Store plugin module bytes into the cache, from actual filesystem.
91
+ pub fn store_bytes_from_path ( & mut self , binary_path : & Path , key : & str ) -> Result < ( ) , Error > {
92
+ #[ cfg( all( not( target_arch = "wasm32" ) , feature = "filesystem_cache" ) ) ]
93
+ {
94
+ let raw_module_bytes =
95
+ std:: fs:: read ( binary_path) . context ( "Cannot read plugin from specified path" ) ?;
96
+
97
+ // If FilesystemCache is available, store serialized bytes into fs.
98
+ if let Some ( fs_cache_store) = & mut self . fs_cache_store {
99
+ let module_bytes_hash = Hash :: generate ( & raw_module_bytes) ;
100
+ let store = crate :: plugin_module_bytes:: new_store ( ) ;
101
+ let module = Module :: new ( & store, raw_module_bytes. clone ( ) )
102
+ . context ( "Cannot compile plugin binary" ) ?;
103
+ fs_cache_store. store ( module_bytes_hash, & module) ?;
104
+
105
+ // Store hash to load from fs_cache_store later.
106
+ self . fs_cache_hash_store
107
+ . insert ( key. to_string ( ) , module_bytes_hash) ;
108
+
109
+ // [TODO]: reenable this
110
+ // self.insert_compiled_module_bytes(key.to_string(), (store,
111
+ // module));
112
+ }
113
+
114
+ // Store raw bytes into memory cache.
115
+ self . insert_raw_bytes ( key. to_string ( ) , raw_module_bytes) ;
116
+
117
+ return Ok ( ( ) ) ;
118
+ }
119
+
120
+ anyhow:: bail!( "Filesystem cache is not enabled, cannot read plugin from phsyical path" ) ;
121
+ }
122
+
123
+ /// Returns a PluingModuleBytes can be compiled into a wasmer::Module.
124
+ /// Depends on the cache availability, it may return a raw bytes or a
125
+ /// serialized bytes.
126
+ pub fn get ( & self , key : & str ) -> Option < Box < dyn PluginModuleBytes > > {
127
+ // Look for compiled module bytes first, it is the cheapest way to get compile
128
+ // wasmer::Module.
129
+ if let Some ( compiled_module) = self . compiled_module_bytes . get ( key) {
130
+ return Some ( Box :: new ( CompiledPluginModuleBytes :: new (
131
+ key. to_string ( ) ,
132
+ compiled_module. 1 . clone ( ) ,
133
+ Store :: new ( compiled_module. 0 . engine ( ) . clone ( ) ) ,
134
+ ) ) ) ;
135
+ }
136
+
137
+ // Next, read serialzied bytes from filesystem cache.
138
+ #[ cfg( all( not( target_arch = "wasm32" ) , feature = "filesystem_cache" ) ) ]
139
+ if let Some ( fs_cache_store) = & self . fs_cache_store {
140
+ let hash = self . fs_cache_hash_store . get ( key) ?;
141
+ let store = crate :: plugin_module_bytes:: new_store ( ) ;
142
+ let module = unsafe { fs_cache_store. load ( & store, * hash) } ;
143
+ if let Ok ( module) = module {
144
+ return Some ( Box :: new ( CompiledPluginModuleBytes :: new (
145
+ key. to_string ( ) ,
146
+ module,
147
+ store,
148
+ ) ) ) ;
149
+ }
150
+ }
151
+
152
+ // Lastly, look for if there's a raw bytes in memory. This requires compilation
153
+ // still, but doesn't go through filesystem access.
154
+ if let Some ( memory_cache_bytes) = self . memory_cache_store . get ( key) {
155
+ return Some ( Box :: new ( RawPluginModuleBytes :: new (
156
+ key. to_string ( ) ,
157
+ memory_cache_bytes. clone ( ) ,
158
+ ) ) ) ;
159
+ }
160
+ None
161
+ }
59
162
}
60
163
61
164
#[ derive( Default ) ]
62
165
pub struct PluginModuleCache {
63
- inner : OnceCell < Mutex < CacheInner > > ,
166
+ pub inner : OnceCell < Mutex < PluginModuleCacheInner > > ,
64
167
/// To prevent concurrent access to `WasmerInstance::new`.
65
168
/// This is a precaution only yet, for the preparation of wasm thread
66
169
/// support in the future.
67
170
instantiation_lock : Mutex < ( ) > ,
68
171
}
69
172
70
- #[ cfg( feature = "filesystem_cache" ) ]
173
+ impl PluginModuleCache {
174
+ pub fn create_inner (
175
+ enable_fs_cache_store : bool ,
176
+ fs_cache_store_root : & Option < String > ,
177
+ ) -> PluginModuleCacheInner {
178
+ PluginModuleCacheInner {
179
+ #[ cfg( all( not( target_arch = "wasm32" ) , feature = "filesystem_cache" ) ) ]
180
+ fs_cache_store : if enable_fs_cache_store {
181
+ create_filesystem_cache ( fs_cache_store_root)
182
+ } else {
183
+ None
184
+ } ,
185
+ #[ cfg( all( not( target_arch = "wasm32" ) , feature = "filesystem_cache" ) ) ]
186
+ fs_cache_hash_store : Default :: default ( ) ,
187
+ memory_cache_store : Default :: default ( ) ,
188
+ compiled_module_bytes : Default :: default ( ) ,
189
+ }
190
+ }
191
+ }
192
+
193
+ #[ cfg( all( not( target_arch = "wasm32" ) , feature = "filesystem_cache" ) ) ]
71
194
#[ tracing:: instrument( level = "info" , skip_all) ]
72
195
fn create_filesystem_cache ( filesystem_cache_root : & Option < String > ) -> Option < FileSystemCache > {
73
196
let mut root_path = if let Some ( root) = filesystem_cache_root {
@@ -93,159 +216,3 @@ fn create_filesystem_cache(filesystem_cache_root: &Option<String>) -> Option<Fil
93
216
94
217
None
95
218
}
96
-
97
- /// Create a new cache instance if not initialized. This can be called multiple
98
- /// time, but any subsequent call will be ignored.
99
- ///
100
- /// This fn have a side effect to create path to cache if given path is not
101
- /// resolvable. If root is not specified, it'll generate default root for
102
- /// cache location.
103
- ///
104
- /// If cache failed to initialize filesystem cache for given location
105
- /// it'll be serve in-memory cache only.
106
- #[ cfg( feature = "filesystem_cache" ) ]
107
- pub fn init_plugin_module_cache_once ( filesystem_cache_root : & Option < String > ) {
108
- PLUGIN_MODULE_CACHE . inner . get_or_init ( || {
109
- Mutex :: new ( CacheInner {
110
- fs_cache : create_filesystem_cache ( filesystem_cache_root) ,
111
- loaded_module_bytes : Default :: default ( ) ,
112
- } )
113
- } ) ;
114
- }
115
-
116
- #[ cfg( feature = "memory_cache" ) ]
117
- pub fn init_plugin_module_cache_once ( _unused_cache_root : & Option < String > ) {
118
- PLUGIN_MODULE_CACHE . inner . get_or_init ( || {
119
- Mutex :: new ( CacheInner {
120
- loaded_module_bytes : Default :: default ( ) ,
121
- } )
122
- } ) ;
123
- }
124
-
125
- impl PluginModuleCache {
126
- /// DO NOT USE unless absolutely necessary. This is mainly for testing
127
- /// purpose.
128
- pub fn new ( ) -> Self {
129
- PluginModuleCache {
130
- inner : OnceCell :: from ( Mutex :: new ( Default :: default ( ) ) ) ,
131
- instantiation_lock : Mutex :: new ( ( ) ) ,
132
- }
133
- }
134
-
135
- /// Load a compiled plugin Module from specified path.
136
- /// Since plugin will be initialized per-file transform, this function tries
137
- /// to avoid reading filesystem per each initialization via naive
138
- /// in-memory map which stores raw bytecodes from file. Unlike compiled
139
- /// bytecode cache for the wasm, this is volatile.
140
- ///
141
- /// ### Notes
142
- /// [This code](https://github.com/swc-project/swc/blob/fc4c6708f24cda39640fbbfe56123f2f6eeb2474/crates/swc/src/plugin.rs#L19-L44)
143
- /// includes previous incorrect attempt to workaround file read issues.
144
- /// In actual transform, `plugins` is also being called per each transform.
145
- #[ cfg( feature = "filesystem_cache" ) ]
146
- #[ tracing:: instrument( level = "info" , skip_all) ]
147
- pub fn load_module ( & self , wasmer_store : & Store , binary_path : & Path ) -> Result < Module , Error > {
148
- let binary_path = binary_path. to_path_buf ( ) ;
149
- let mut inner_cache = self . inner . get ( ) . expect ( "Cache should be available" ) . lock ( ) ;
150
-
151
- // if constructed Module is available in-memory, directly return it.
152
- // Note we do not invalidate in-memory cache currently: if wasm binary is
153
- // replaced in-process lifecycle (i.e devserver) it won't be reflected.
154
-
155
- /*
156
- [TODO]: This is currently disabled, since on the latest wasmer@3 subsequent
157
- plugin load via in memory module causes intermittent heap_get_oob when
158
- host tries to allocate memory inside of the guest.
159
-
160
- Current guess is memory instance is being corrupted by the previous run, but
161
- until figure out root cause & fix will only use fs_cache directly.
162
- let in_memory_module = inner_cache.loaded_module_bytes.get(&binary_path);
163
- if let Some(module) = in_memory_module {
164
- return Ok(module.clone());
165
- }*/
166
-
167
- let module_bytes =
168
- std:: fs:: read ( & binary_path) . context ( "Cannot read plugin from specified path" ) ?;
169
- let module_bytes_hash = Hash :: generate ( & module_bytes) ;
170
-
171
- let load_cold_wasm_bytes = || {
172
- let span = tracing:: span!(
173
- tracing:: Level :: INFO ,
174
- "load_cold_wasm_bytes" ,
175
- plugin_module = binary_path. to_str( )
176
- ) ;
177
- let span_guard = span. enter ( ) ;
178
- let _lock = self . instantiation_lock . lock ( ) ;
179
- let ret =
180
- Module :: new ( wasmer_store, module_bytes) . context ( "Cannot compile plugin binary" ) ;
181
- drop ( span_guard) ;
182
- ret
183
- } ;
184
-
185
- // Try to load compiled bytes from filesystem cache if available.
186
- // Otherwise, cold compile instead.
187
- let module = if let Some ( fs_cache) = & mut inner_cache. fs_cache {
188
- let load_result = unsafe { fs_cache. load ( wasmer_store, module_bytes_hash) } ;
189
- if let Ok ( module) = load_result {
190
- module
191
- } else {
192
- let cold_bytes = load_cold_wasm_bytes ( ) ?;
193
- fs_cache. store ( module_bytes_hash, & cold_bytes) ?;
194
- cold_bytes
195
- }
196
- } else {
197
- load_cold_wasm_bytes ( ) ?
198
- } ;
199
-
200
- inner_cache
201
- . loaded_module_bytes
202
- . insert ( binary_path, module. clone ( ) ) ;
203
-
204
- Ok ( module)
205
- }
206
-
207
- #[ cfg( feature = "memory_cache" ) ]
208
- #[ tracing:: instrument( level = "info" , skip_all) ]
209
- pub fn load_module ( & self , wasmer_store : & Store , binary_path : & Path ) -> Result < Module , Error > {
210
- let binary_path = binary_path. to_path_buf ( ) ;
211
- let mut inner_cache = self . inner . get ( ) . expect ( "Cache should be available" ) . lock ( ) ;
212
-
213
- // In case of memory_cache, we do not have way to resolve / load modules
214
- // externally. Bail out if cache doesn't have corresponding binary.
215
- let in_memory_module_bytes = inner_cache
216
- . loaded_module_bytes
217
- . get ( & binary_path)
218
- . ok_or_else ( || {
219
- anyhow:: anyhow!( "Could not locate plugin binary {}" , binary_path. display( ) )
220
- } ) ?;
221
-
222
- //TODO: In native runtime we have to reconstruct module using raw bytes in
223
- // memory cache. requires https://github.com/wasmerio/wasmer/pull/2821
224
- let module = Module :: new ( wasmer_store, in_memory_module_bytes) ?;
225
-
226
- Ok ( module)
227
- }
228
-
229
- /// An experimental interface to store externally loaded module bytes into
230
- /// cache. This is primarily to support swc/wasm-* target, which does
231
- /// not have way to access system, especially filesystem by default.
232
- ///
233
- /// Currently this doesn't do any validation or expiration: once a bytes set
234
- /// with specific id, subsequent call will noop.
235
- ///
236
- /// This interface is not a public, but also will likely change anytime
237
- /// while stablizing plugin interface.
238
- #[ cfg( feature = "memory_cache" ) ]
239
- #[ tracing:: instrument( level = "info" , skip_all) ]
240
- pub fn store_once ( & self , module_name : & str , module_bytes : Vec < u8 > ) {
241
- // We use path as canonical id for the cache
242
- let binary_path = PathBuf :: from ( module_name) ;
243
- let mut inner_cache = self . inner . get ( ) . expect ( "Cache should be available" ) . lock ( ) ;
244
-
245
- if !inner_cache. loaded_module_bytes . contains_key ( & binary_path) {
246
- inner_cache
247
- . loaded_module_bytes
248
- . insert ( binary_path, module_bytes) ;
249
- }
250
- }
251
- }
1 commit comments
github-actions[bot] commentedon May 18, 2023
Benchmark
es/full/bugs-1
252592
ns/iter (± 5424
)257674
ns/iter (± 7664
)0.98
es/full/minify/libraries/antd
1202844503
ns/iter (± 4954937
)1266231558
ns/iter (± 17322954
)0.95
es/full/minify/libraries/d3
242352186
ns/iter (± 3807527
)250740202
ns/iter (± 3279625
)0.97
es/full/minify/libraries/echarts
980360776
ns/iter (± 16942866
)1013967363
ns/iter (± 6882597
)0.97
es/full/minify/libraries/jquery
77325100
ns/iter (± 220040
)77764633
ns/iter (± 311808
)0.99
es/full/minify/libraries/lodash
87289589
ns/iter (± 171655
)88251649
ns/iter (± 312335
)0.99
es/full/minify/libraries/moment
45097304
ns/iter (± 72779
)45181276
ns/iter (± 220821
)1.00
es/full/minify/libraries/react
16352722
ns/iter (± 55096
)16362531
ns/iter (± 72352
)1.00
es/full/minify/libraries/terser
200055431
ns/iter (± 985227
)203958448
ns/iter (± 1742757
)0.98
es/full/minify/libraries/three
344506794
ns/iter (± 3934984
)356163069
ns/iter (± 1397637
)0.97
es/full/minify/libraries/typescript
2438984073
ns/iter (± 18420607
)2546082292
ns/iter (± 17576069
)0.96
es/full/minify/libraries/victory
509710826
ns/iter (± 4560544
)557689635
ns/iter (± 13252207
)0.91
es/full/minify/libraries/vue
109674007
ns/iter (± 548997
)111454460
ns/iter (± 361771
)0.98
es/full/codegen/es3
31548
ns/iter (± 63
)30830
ns/iter (± 81
)1.02
es/full/codegen/es5
31450
ns/iter (± 41
)30778
ns/iter (± 28
)1.02
es/full/codegen/es2015
31583
ns/iter (± 83
)30791
ns/iter (± 53
)1.03
es/full/codegen/es2016
31621
ns/iter (± 55
)30841
ns/iter (± 47
)1.03
es/full/codegen/es2017
31695
ns/iter (± 59
)30837
ns/iter (± 52
)1.03
es/full/codegen/es2018
31677
ns/iter (± 65
)30847
ns/iter (± 55
)1.03
es/full/codegen/es2019
31567
ns/iter (± 90
)30772
ns/iter (± 31
)1.03
es/full/codegen/es2020
31626
ns/iter (± 74
)30815
ns/iter (± 51
)1.03
es/full/all/es3
157139680
ns/iter (± 597935
)155922442
ns/iter (± 809464
)1.01
es/full/all/es5
150520055
ns/iter (± 640589
)149541304
ns/iter (± 999754
)1.01
es/full/all/es2015
112126624
ns/iter (± 541628
)109853283
ns/iter (± 692847
)1.02
es/full/all/es2016
111067630
ns/iter (± 677859
)108487420
ns/iter (± 509376
)1.02
es/full/all/es2017
109804842
ns/iter (± 295091
)108601255
ns/iter (± 506021
)1.01
es/full/all/es2018
108435236
ns/iter (± 763102
)106717214
ns/iter (± 682804
)1.02
es/full/all/es2019
107569052
ns/iter (± 378890
)106150576
ns/iter (± 705550
)1.01
es/full/all/es2020
102757893
ns/iter (± 483932
)101121347
ns/iter (± 442632
)1.02
es/full/parser
466064
ns/iter (± 4742
)451937
ns/iter (± 5434
)1.03
es/full/base/fixer
17322
ns/iter (± 35
)17828
ns/iter (± 116
)0.97
es/full/base/resolver_and_hygiene
75371
ns/iter (± 114
)74803
ns/iter (± 209
)1.01
serialization of serde
112
ns/iter (± 0
)115
ns/iter (± 0
)0.97
css/minify/libraries/bootstrap
23466855
ns/iter (± 106481
)23407964
ns/iter (± 62960
)1.00
css/visitor/compare/clone
1648014
ns/iter (± 2306
)1655630
ns/iter (± 7660
)1.00
css/visitor/compare/visit_mut_span
1781773
ns/iter (± 11865
)1803241
ns/iter (± 5888
)0.99
css/visitor/compare/visit_mut_span_panic
1858557
ns/iter (± 5501
)1864307
ns/iter (± 3125
)1.00
css/visitor/compare/fold_span
2538700
ns/iter (± 13291
)2582450
ns/iter (± 12922
)0.98
css/visitor/compare/fold_span_panic
2722417
ns/iter (± 10002
)2746327
ns/iter (± 12913
)0.99
css/lexer/bootstrap_5_1_3
4550821
ns/iter (± 3565
)4615709
ns/iter (± 4566
)0.99
css/lexer/foundation_6_7_4
3782648
ns/iter (± 2110
)3902842
ns/iter (± 2021
)0.97
css/lexer/tailwind_3_1_1
716361
ns/iter (± 176
)749177
ns/iter (± 266
)0.96
css/parser/bootstrap_5_1_3
18160277
ns/iter (± 19317
)18103554
ns/iter (± 21624
)1.00
css/parser/foundation_6_7_4
14509286
ns/iter (± 12483
)14461561
ns/iter (± 30099
)1.00
css/parser/tailwind_3_1_1
2797938
ns/iter (± 2586
)2824616
ns/iter (± 5648
)0.99
es/codegen/colors
732469
ns/iter (± 399948
)730739
ns/iter (± 400259
)1.00
es/codegen/large
3027150
ns/iter (± 1590754
)2966580
ns/iter (± 1574944
)1.02
es/codegen/with-parser/colors
42973
ns/iter (± 482
)43364
ns/iter (± 478
)0.99
es/codegen/with-parser/large
475056
ns/iter (± 1076
)477160
ns/iter (± 874
)1.00
es/minify/libraries/antd
1063905053
ns/iter (± 10946120
)1113966302
ns/iter (± 6138488
)0.96
es/minify/libraries/d3
214423687
ns/iter (± 946122
)216890742
ns/iter (± 896499
)0.99
es/minify/libraries/echarts
843397903
ns/iter (± 5085529
)892573497
ns/iter (± 5422988
)0.94
es/minify/libraries/jquery
68999765
ns/iter (± 133936
)69832194
ns/iter (± 986298
)0.99
es/minify/libraries/lodash
79335248
ns/iter (± 121033
)80058998
ns/iter (± 220803
)0.99
es/minify/libraries/moment
40508573
ns/iter (± 97458
)40390891
ns/iter (± 117549
)1.00
es/minify/libraries/react
14865390
ns/iter (± 28036
)14791940
ns/iter (± 29838
)1.00
es/minify/libraries/terser
176139926
ns/iter (± 1862284
)177969826
ns/iter (± 782232
)0.99
es/minify/libraries/three
295337616
ns/iter (± 7401562
)305079363
ns/iter (± 1757013
)0.97
es/minify/libraries/typescript
2119142460
ns/iter (± 16202173
)2176181947
ns/iter (± 7917582
)0.97
es/minify/libraries/victory
439241424
ns/iter (± 3268040
)461679321
ns/iter (± 4176874
)0.95
es/minify/libraries/vue
100779880
ns/iter (± 492314
)100670436
ns/iter (± 432000
)1.00
es/visitor/compare/clone
1996976
ns/iter (± 5140
)2016809
ns/iter (± 3989
)0.99
es/visitor/compare/visit_mut_span
2328264
ns/iter (± 1582
)2350596
ns/iter (± 2472
)0.99
es/visitor/compare/visit_mut_span_panic
2380152
ns/iter (± 2695
)2409314
ns/iter (± 2830
)0.99
es/visitor/compare/fold_span
3402995
ns/iter (± 4698
)3430909
ns/iter (± 4937
)0.99
es/visitor/compare/fold_span_panic
3544476
ns/iter (± 4302
)3565743
ns/iter (± 3340
)0.99
es/lexer/colors
11636
ns/iter (± 15
)11501
ns/iter (± 6
)1.01
es/lexer/angular
5643819
ns/iter (± 5535
)5689798
ns/iter (± 13076
)0.99
es/lexer/backbone
718171
ns/iter (± 1742
)731166
ns/iter (± 3227
)0.98
es/lexer/jquery
4041167
ns/iter (± 1337
)4092041
ns/iter (± 4310
)0.99
es/lexer/jquery mobile
6256846
ns/iter (± 11114
)6282331
ns/iter (± 3795
)1.00
es/lexer/mootools
3207482
ns/iter (± 1629
)3244644
ns/iter (± 907
)0.99
es/lexer/underscore
590211
ns/iter (± 1393
)603279
ns/iter (± 364
)0.98
es/lexer/three
19129693
ns/iter (± 8588
)19259424
ns/iter (± 24213
)0.99
es/lexer/yui
3531819
ns/iter (± 12102
)3514391
ns/iter (± 26595
)1.00
es/parser/colors
25607
ns/iter (± 65
)25624
ns/iter (± 57
)1.00
es/parser/angular
13039645
ns/iter (± 50413
)13173078
ns/iter (± 68775
)0.99
es/parser/backbone
1943160
ns/iter (± 10513
)1943729
ns/iter (± 6275
)1.00
es/parser/jquery
10518069
ns/iter (± 36331
)10667730
ns/iter (± 216945
)0.99
es/parser/jquery mobile
16222263
ns/iter (± 88149
)16276529
ns/iter (± 80169
)1.00
es/parser/mootools
8114008
ns/iter (± 12688
)8104265
ns/iter (± 146433
)1.00
es/parser/underscore
1662798
ns/iter (± 10002
)1659190
ns/iter (± 10852
)1.00
es/parser/three
45337975
ns/iter (± 155210
)46954920
ns/iter (± 245407
)0.97
es/parser/yui
8043391
ns/iter (± 43835
)8094190
ns/iter (± 43765
)0.99
es/preset-env/usage/builtin_type
146213
ns/iter (± 39620
)146733
ns/iter (± 40123
)1.00
es/preset-env/usage/property
15569
ns/iter (± 40
)15091
ns/iter (± 49
)1.03
es/resolver/typescript
90299073
ns/iter (± 1047880
)91541535
ns/iter (± 957182
)0.99
es/fixer/typescript
65482578
ns/iter (± 1174484
)67354908
ns/iter (± 312109
)0.97
es/hygiene/typescript
133171134
ns/iter (± 1319213
)137438837
ns/iter (± 1494119
)0.97
es/resolver_with_hygiene/typescript
232722111
ns/iter (± 973419
)240070803
ns/iter (± 1642770
)0.97
es/visitor/base-perf/module_clone
58902
ns/iter (± 187
)59133
ns/iter (± 461
)1.00
es/visitor/base-perf/fold_empty
63197
ns/iter (± 190
)63100
ns/iter (± 350
)1.00
es/visitor/base-perf/fold_noop_impl_all
63464
ns/iter (± 217
)63028
ns/iter (± 326
)1.01
es/visitor/base-perf/fold_noop_impl_vec
63470
ns/iter (± 237
)63354
ns/iter (± 353
)1.00
es/visitor/base-perf/boxing_boxed_clone
53
ns/iter (± 0
)69
ns/iter (± 9
)0.77
es/visitor/base-perf/boxing_unboxed_clone
36
ns/iter (± 0
)61
ns/iter (± 0
)0.59
es/visitor/base-perf/boxing_boxed
112
ns/iter (± 0
)117
ns/iter (± 2
)0.96
es/visitor/base-perf/boxing_unboxed
78
ns/iter (± 0
)78
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
2660
ns/iter (± 11
)2635
ns/iter (± 36
)1.01
es/base/parallel/resolver/typescript
3974713911
ns/iter (± 296483813
)3900500330
ns/iter (± 281054074
)1.02
es/base/parallel/hygiene/typescript
1423983835
ns/iter (± 18474203
)1462849993
ns/iter (± 17650767
)0.97
misc/visitors/time-complexity/time 5
105
ns/iter (± 1
)101
ns/iter (± 0
)1.04
misc/visitors/time-complexity/time 10
263
ns/iter (± 0
)386
ns/iter (± 3
)0.68
misc/visitors/time-complexity/time 15
719
ns/iter (± 5
)717
ns/iter (± 1
)1.00
misc/visitors/time-complexity/time 20
1137
ns/iter (± 72
)1094
ns/iter (± 5
)1.04
misc/visitors/time-complexity/time 40
3826
ns/iter (± 149
)3740
ns/iter (± 8
)1.02
misc/visitors/time-complexity/time 60
7745
ns/iter (± 59
)7742
ns/iter (± 9
)1.00
es/full-target/es2016
225429
ns/iter (± 407
)223877
ns/iter (± 1121
)1.01
es/full-target/es2017
214775
ns/iter (± 548
)213539
ns/iter (± 574
)1.01
es/full-target/es2018
202289
ns/iter (± 518
)202499
ns/iter (± 749
)1.00
es2020_nullish_coalescing
69559
ns/iter (± 315
)69209
ns/iter (± 422
)1.01
es2020_optional_chaining
94329
ns/iter (± 611
)94649
ns/iter (± 242
)1.00
es2022_class_properties
116083
ns/iter (± 254
)118607
ns/iter (± 323
)0.98
es2018_object_rest_spread
73825
ns/iter (± 513
)74109
ns/iter (± 256
)1.00
es2019_optional_catch_binding
63171
ns/iter (± 184
)63332
ns/iter (± 141
)1.00
es2017_async_to_generator
63126
ns/iter (± 153
)63463
ns/iter (± 186
)0.99
es2016_exponentiation
68100
ns/iter (± 275
)67947
ns/iter (± 240
)1.00
es2015_arrow
71111
ns/iter (± 795
)70798
ns/iter (± 171
)1.00
es2015_block_scoped_fn
67534
ns/iter (± 143
)67556
ns/iter (± 320
)1.00
es2015_block_scoping
118896
ns/iter (± 517
)119113
ns/iter (± 243
)1.00
This comment was automatically generated by workflow using github-action-benchmark.