File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ use bench_source_map::{
2929
3030use benchmark_repetitive_react_components:: {
3131 benchmark_repetitive_react_components_map,
32+ benchmark_repetitive_react_components_index_map,
3233 benchmark_repetitive_react_components_source,
3334} ;
3435
@@ -188,6 +189,11 @@ fn bench_rspack_sources(criterion: &mut Criterion) {
188189 benchmark_repetitive_react_components_map,
189190 ) ;
190191
192+ group. bench_function (
193+ "repetitive_react_components_index_map" ,
194+ benchmark_repetitive_react_components_index_map,
195+ ) ;
196+
191197 group. bench_function (
192198 "repetitive_react_components_source" ,
193199 benchmark_repetitive_react_components_source,
Original file line number Diff line number Diff line change @@ -3509,6 +3509,14 @@ pub fn benchmark_repetitive_react_components_map(b: &mut Bencher) {
35093509 } ) ;
35103510}
35113511
3512+ pub fn benchmark_repetitive_react_components_index_map ( b : & mut Bencher ) {
3513+ let source = REPETITIVE_1K_REACT_COMPONENTS_SOURCE . clone ( ) ;
3514+
3515+ b. iter ( || {
3516+ black_box ( source. index_map ( & ObjectPool :: default ( ) , & MapOptions :: default ( ) ) ) ;
3517+ } ) ;
3518+ }
3519+
35123520pub fn benchmark_repetitive_react_components_source ( b : & mut Bencher ) {
35133521 let source = REPETITIVE_1K_REACT_COMPONENTS_SOURCE . clone ( ) ;
35143522
You can’t perform that action at this time.
0 commit comments