Skip to content

Commit

Permalink
fix(bindings/cli): Implement source-file-name and source-root opt…
Browse files Browse the repository at this point in the history
…ions (#6973)
  • Loading branch information
realtimetodie authored Feb 27, 2023
1 parent 2525a84 commit 3e3e41a
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 19 deletions.
13 changes: 10 additions & 3 deletions bindings/Cargo.lock

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

1 change: 1 addition & 0 deletions bindings/swc_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ rayon = "1"
relative-path = "1.6.1"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["unbounded_depth"] }
sourcemap = "6.2.2"
swc_core = { version = "0.59.36", features = [
"trace_macro",
"common_concurrent",
Expand Down
80 changes: 65 additions & 15 deletions bindings/swc_cli/src/commands/compile.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::{
borrow::Cow,
fs::{self, File},
io::{self, Read, Write},
path::{Component, Path, PathBuf},
Expand Down Expand Up @@ -212,10 +213,22 @@ fn resolve_output_file_path(

fn emit_output(
mut output: TransformOutput,
source_file_name: &Option<String>,
source_root: &Option<String>,
out_dir: &Option<PathBuf>,
file_path: &Path,
file_extension: PathBuf,
) -> anyhow::Result<()> {
let source_map = if let Some(ref source_map) = &output.map {
Some(extend_source_map(
source_map.to_owned(),
source_file_name,
source_root,
)?)
} else {
None
};

if let Some(out_dir) = out_dir {
let output_file_path = resolve_output_file_path(out_dir, file_path, file_extension)?;
let output_dir = output_file_path
Expand All @@ -226,7 +239,7 @@ fn emit_output(
fs::create_dir_all(output_dir)?;
}

if let Some(source_map) = &output.map {
if let Some(ref source_map) = source_map {
let source_map_path = output_file_path.with_extension("js.map");

output.code.push_str("\n//# sourceMappingURL=");
Expand All @@ -239,16 +252,13 @@ fn emit_output(

fs::write(output_file_path, &output.code)?;
} else {
println!(
"{}\n{}\n{}",
file_path.display(),
output.code,
output
.map
.as_ref()
.map(|m| m.to_string())
.unwrap_or_default()
);
let source_map = if let Some(ref source_map) = source_map {
String::from_utf8_lossy(source_map)
} else {
Cow::Borrowed("")
};

println!("{}\n{}\n{}", file_path.display(), output.code, source_map,);
};
Ok(())
}
Expand Down Expand Up @@ -324,6 +334,9 @@ impl CompileOptions {
"true" => SourceMapsConfig::Bool(true),
value => SourceMapsConfig::Str(value.to_string()),
});

options.source_file_name = self.source_file_name.to_owned();
options.source_root = self.source_root.to_owned();
}

Ok(options)
Expand Down Expand Up @@ -469,10 +482,17 @@ impl CompileOptions {
buf_srcmap = Some(File::create(map_out_file)?);
}

let source_map = extend_source_map(
src_map.to_owned(),
&self.source_file_name,
&self.source_root,
)
.unwrap();

buf_srcmap
.as_ref()
.expect("Srcmap buffer should be available")
.write(src_map.as_bytes())
.write(&source_map)
.and(Ok(()))?;
}

Expand All @@ -498,9 +518,14 @@ impl CompileOptions {
let result = execute(compiler, fm, options);

match result {
Ok(output) => {
emit_output(output, &self.out_dir, &file_path, file_extension)
}
Ok(output) => emit_output(
output,
&self.source_file_name,
&self.source_root,
&self.out_dir,
&file_path,
file_extension,
),
Err(e) => Err(e),
}
},
Expand All @@ -509,6 +534,31 @@ impl CompileOptions {
}
}

// TODO: remove once fixed in core https://github.com/swc-project/swc/issues/1388
fn extend_source_map(
source_map: String,
source_file_name: &Option<String>,
source_root: &Option<String>,
) -> anyhow::Result<Vec<u8>> {
let mut source_map = sourcemap::SourceMap::from_reader(source_map.as_bytes())
.context("failed to encode source map")?;

if let Some(ref source_file_name) = source_file_name {
source_map.set_source(0u32, source_file_name);
}

if source_root.is_some() {
source_map.set_source_root(source_root.clone());
}

let mut buf = vec![];
source_map
.to_writer(&mut buf)
.context("failed to decode source map")?;

Ok(buf)
}

#[swc_trace]
impl super::CommandRunner for CompileOptions {
fn execute(&self) -> anyhow::Result<()> {
Expand Down
6 changes: 5 additions & 1 deletion bindings/swc_cli/src/commands/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ build-wasm32 = "build --target wasm32-unknown-unknown"
.context("failed to write config toml file")?;

// Create package.json for npm package publishing.
let dist_output_path = format!("target/{}/release/{}.wasm", build_target, name.replace("-", "_"));
let dist_output_path = format!(
"target/{}/release/{}.wasm",
build_target,
name.replace("-", "_")
);
fs::write(
&path.join("package.json"),
format!(
Expand Down

1 comment on commit 3e3e41a

@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: 3e3e41a Previous: cc1d9bd Ratio
es/full/bugs-1 308457 ns/iter (± 7605) 312287 ns/iter (± 22196) 0.99
es/full/minify/libraries/antd 1563191241 ns/iter (± 17285997) 1749203954 ns/iter (± 62970471) 0.89
es/full/minify/libraries/d3 296998465 ns/iter (± 8106582) 307596847 ns/iter (± 9819478) 0.97
es/full/minify/libraries/echarts 1212323865 ns/iter (± 10201253) 1278107832 ns/iter (± 43228346) 0.95
es/full/minify/libraries/jquery 90093206 ns/iter (± 440508) 94922611 ns/iter (± 4094870) 0.95
es/full/minify/libraries/lodash 105198033 ns/iter (± 1352326) 107236007 ns/iter (± 2317536) 0.98
es/full/minify/libraries/moment 52820103 ns/iter (± 131111) 53830172 ns/iter (± 1822581) 0.98
es/full/minify/libraries/react 19110778 ns/iter (± 96622) 19138460 ns/iter (± 276435) 1.00
es/full/minify/libraries/terser 246469713 ns/iter (± 3257394) 243936500 ns/iter (± 9195511) 1.01
es/full/minify/libraries/three 445949241 ns/iter (± 4934354) 434515973 ns/iter (± 19268015) 1.03
es/full/minify/libraries/typescript 3005344392 ns/iter (± 10994934) 3097431758 ns/iter (± 39524932) 0.97
es/full/minify/libraries/victory 652754779 ns/iter (± 11051540) 653429490 ns/iter (± 25014363) 1.00
es/full/minify/libraries/vue 130974177 ns/iter (± 393300) 130694829 ns/iter (± 3138700) 1.00
es/full/codegen/es3 25886 ns/iter (± 70) 25428 ns/iter (± 201) 1.02
es/full/codegen/es5 25906 ns/iter (± 63) 25694 ns/iter (± 143) 1.01
es/full/codegen/es2015 25768 ns/iter (± 89) 25572 ns/iter (± 142) 1.01
es/full/codegen/es2016 25852 ns/iter (± 120) 25575 ns/iter (± 295) 1.01
es/full/codegen/es2017 25832 ns/iter (± 90) 25349 ns/iter (± 294) 1.02
es/full/codegen/es2018 25662 ns/iter (± 86) 25500 ns/iter (± 331) 1.01
es/full/codegen/es2019 25862 ns/iter (± 43) 25503 ns/iter (± 165) 1.01
es/full/codegen/es2020 25856 ns/iter (± 52) 24970 ns/iter (± 173) 1.04
es/full/all/es3 173782761 ns/iter (± 3567858) 178993015 ns/iter (± 4163605) 0.97
es/full/all/es5 163995800 ns/iter (± 2252010) 169568498 ns/iter (± 3565982) 0.97
es/full/all/es2015 125276563 ns/iter (± 1439213) 128955554 ns/iter (± 4828148) 0.97
es/full/all/es2016 122817028 ns/iter (± 1143996) 125404677 ns/iter (± 7143095) 0.98
es/full/all/es2017 122665368 ns/iter (± 945920) 122616202 ns/iter (± 1587489) 1.00
es/full/all/es2018 120447503 ns/iter (± 1048160) 124055034 ns/iter (± 2668700) 0.97
es/full/all/es2019 120131880 ns/iter (± 1068448) 121026696 ns/iter (± 3382127) 0.99
es/full/all/es2020 115071195 ns/iter (± 825446) 116169999 ns/iter (± 1782452) 0.99
es/full/parser 539962 ns/iter (± 8384) 531368 ns/iter (± 14070) 1.02
es/full/base/fixer 21960 ns/iter (± 66) 21706 ns/iter (± 229) 1.01
es/full/base/resolver_and_hygiene 81352 ns/iter (± 257) 80433 ns/iter (± 926) 1.01
serialization of ast node 123 ns/iter (± 0) 122 ns/iter (± 1) 1.01
serialization of serde 126 ns/iter (± 0) 126 ns/iter (± 1) 1
css/minify/libraries/bootstrap 27886502 ns/iter (± 42281) 27325840 ns/iter (± 463387) 1.02
css/visitor/compare/clone 2069243 ns/iter (± 11060) 2073094 ns/iter (± 30832) 1.00
css/visitor/compare/visit_mut_span 2253175 ns/iter (± 3596) 2205394 ns/iter (± 23547) 1.02
css/visitor/compare/visit_mut_span_panic 2329200 ns/iter (± 7190) 2284172 ns/iter (± 17689) 1.02
css/visitor/compare/fold_span 3033944 ns/iter (± 17919) 2961219 ns/iter (± 22776) 1.02
css/visitor/compare/fold_span_panic 3194074 ns/iter (± 20929) 3129301 ns/iter (± 50547) 1.02
css/lexer/bootstrap_5_1_3 5173582 ns/iter (± 1764) 5041506 ns/iter (± 62685) 1.03
css/lexer/foundation_6_7_4 4342914 ns/iter (± 1035) 4304723 ns/iter (± 38498) 1.01
css/lexer/tailwind_3_1_1 827964 ns/iter (± 495) 816039 ns/iter (± 9606) 1.01
css/parser/bootstrap_5_1_3 21649665 ns/iter (± 98419) 21378999 ns/iter (± 340223) 1.01
css/parser/foundation_6_7_4 17369587 ns/iter (± 62936) 17320253 ns/iter (± 67949) 1.00
css/parser/tailwind_3_1_1 3316083 ns/iter (± 1716) 3259706 ns/iter (± 16986) 1.02
es/codegen/colors 318156 ns/iter (± 179315) 322873 ns/iter (± 185245) 0.99
es/codegen/large 1254547 ns/iter (± 631870) 1221182 ns/iter (± 638983) 1.03
es/codegen/with-parser/colors 48809 ns/iter (± 412) 48776 ns/iter (± 329) 1.00
es/codegen/with-parser/large 538380 ns/iter (± 1592) 526329 ns/iter (± 4613) 1.02
es/minify/libraries/antd 1400545185 ns/iter (± 11349200) 1489785182 ns/iter (± 45502467) 0.94
es/minify/libraries/d3 255652910 ns/iter (± 7547820) 254169325 ns/iter (± 12017501) 1.01
es/minify/libraries/echarts 1078598259 ns/iter (± 13397790) 1106454659 ns/iter (± 52884229) 0.97
es/minify/libraries/jquery 78728356 ns/iter (± 533139) 78881365 ns/iter (± 2176210) 1.00
es/minify/libraries/lodash 96239265 ns/iter (± 740931) 95118594 ns/iter (± 1878839) 1.01
es/minify/libraries/moment 46345454 ns/iter (± 290336) 46143679 ns/iter (± 655228) 1.00
es/minify/libraries/react 17202138 ns/iter (± 201794) 17423561 ns/iter (± 269906) 0.99
es/minify/libraries/terser 214766606 ns/iter (± 2437386) 212659077 ns/iter (± 5040843) 1.01
es/minify/libraries/three 366772677 ns/iter (± 3411338) 372858944 ns/iter (± 17677851) 0.98
es/minify/libraries/typescript 2571248706 ns/iter (± 8751988) 2673061979 ns/iter (± 40673055) 0.96
es/minify/libraries/victory 569461015 ns/iter (± 7026615) 549941730 ns/iter (± 13502562) 1.04
es/minify/libraries/vue 117061504 ns/iter (± 780898) 114444930 ns/iter (± 2168299) 1.02
es/visitor/compare/clone 2398149 ns/iter (± 49860) 2372278 ns/iter (± 18685) 1.01
es/visitor/compare/visit_mut_span 2795414 ns/iter (± 6749) 2684602 ns/iter (± 33816) 1.04
es/visitor/compare/visit_mut_span_panic 2862743 ns/iter (± 8271) 2757482 ns/iter (± 65672) 1.04
es/visitor/compare/fold_span 3942414 ns/iter (± 117598) 3800292 ns/iter (± 51271) 1.04
es/visitor/compare/fold_span_panic 4102684 ns/iter (± 9158) 4001957 ns/iter (± 25106) 1.03
es/lexer/colors 17438 ns/iter (± 16) 16977 ns/iter (± 185) 1.03
es/lexer/angular 8317907 ns/iter (± 12046) 8079094 ns/iter (± 48337) 1.03
es/lexer/backbone 1092189 ns/iter (± 1200) 1053947 ns/iter (± 12910) 1.04
es/lexer/jquery 6024343 ns/iter (± 4582) 5881650 ns/iter (± 80524) 1.02
es/lexer/jquery mobile 9279126 ns/iter (± 15560) 9197855 ns/iter (± 69154) 1.01
es/lexer/mootools 4718479 ns/iter (± 6230) 4716519 ns/iter (± 29848) 1.00
es/lexer/underscore 909274 ns/iter (± 523) 907674 ns/iter (± 2834) 1.00
es/lexer/three 28079181 ns/iter (± 22396) 28021810 ns/iter (± 336487) 1.00
es/lexer/yui 5095741 ns/iter (± 3977) 5085353 ns/iter (± 26605) 1.00
es/parser/colors 31464 ns/iter (± 58) 31120 ns/iter (± 606) 1.01
es/parser/angular 16088611 ns/iter (± 100877) 15968434 ns/iter (± 288306) 1.01
es/parser/backbone 2341398 ns/iter (± 14892) 2335047 ns/iter (± 17624) 1.00
es/parser/jquery 12607191 ns/iter (± 60407) 12786035 ns/iter (± 624260) 0.99
es/parser/jquery mobile 19765486 ns/iter (± 243233) 19058565 ns/iter (± 572771) 1.04
es/parser/mootools 9614826 ns/iter (± 31538) 9381871 ns/iter (± 146577) 1.02
es/parser/underscore 1988759 ns/iter (± 13106) 1942889 ns/iter (± 18967) 1.02
es/parser/three 58746042 ns/iter (± 582150) 56496381 ns/iter (± 1997326) 1.04
es/parser/yui 9661877 ns/iter (± 47509) 9484223 ns/iter (± 129201) 1.02
es/preset-env/usage/builtin_type 143151 ns/iter (± 32856) 143026 ns/iter (± 32794) 1.00
es/preset-env/usage/property 21420 ns/iter (± 75) 21430 ns/iter (± 253) 1.00
es/resolver/typescript 111942748 ns/iter (± 2529563) 122071768 ns/iter (± 2462823) 0.92
es/fixer/typescript 83353194 ns/iter (± 406868) 97581334 ns/iter (± 2171211) 0.85
es/hygiene/typescript 180240163 ns/iter (± 1209231) 198424238 ns/iter (± 4613501) 0.91
es/resolver_with_hygiene/typescript 321511988 ns/iter (± 1844688) 344252661 ns/iter (± 8933897) 0.93
es/visitor/base-perf/module_clone 75824 ns/iter (± 1712) 75592 ns/iter (± 1094) 1.00
es/visitor/base-perf/fold_empty 85798 ns/iter (± 1363) 84605 ns/iter (± 1111) 1.01
es/visitor/base-perf/fold_noop_impl_all 85468 ns/iter (± 2015) 84137 ns/iter (± 1823) 1.02
es/visitor/base-perf/fold_noop_impl_vec 87582 ns/iter (± 1709) 84063 ns/iter (± 1882) 1.04
es/visitor/base-perf/boxing_boxed_clone 56 ns/iter (± 0) 55 ns/iter (± 0) 1.02
es/visitor/base-perf/boxing_unboxed_clone 61 ns/iter (± 0) 59 ns/iter (± 0) 1.03
es/visitor/base-perf/boxing_boxed 106 ns/iter (± 0) 104 ns/iter (± 0) 1.02
es/visitor/base-perf/boxing_unboxed 103 ns/iter (± 0) 100 ns/iter (± 1) 1.03
es/visitor/base-perf/visit_contains_this 3461 ns/iter (± 78) 3496 ns/iter (± 78) 0.99
es/base/parallel/resolver/typescript 5306833482 ns/iter (± 349935843) 5319791705 ns/iter (± 558425717) 1.00
es/base/parallel/hygiene/typescript 2150480678 ns/iter (± 21884796) 2397702616 ns/iter (± 29412221) 0.90
misc/visitors/time-complexity/time 5 96 ns/iter (± 0) 95 ns/iter (± 1) 1.01
misc/visitors/time-complexity/time 10 348 ns/iter (± 0) 338 ns/iter (± 8) 1.03
misc/visitors/time-complexity/time 15 657 ns/iter (± 1) 654 ns/iter (± 11) 1.00
misc/visitors/time-complexity/time 20 1212 ns/iter (± 3) 1227 ns/iter (± 12) 0.99
misc/visitors/time-complexity/time 40 6224 ns/iter (± 11) 6084 ns/iter (± 49) 1.02
misc/visitors/time-complexity/time 60 15651 ns/iter (± 62) 15334 ns/iter (± 114) 1.02
es/full-target/es2016 188441 ns/iter (± 363) 186465 ns/iter (± 2547) 1.01
es/full-target/es2017 183543 ns/iter (± 580) 179973 ns/iter (± 1844) 1.02
es/full-target/es2018 171916 ns/iter (± 337) 168075 ns/iter (± 1935) 1.02
es2020_nullish_coalescing 67447 ns/iter (± 154) 65237 ns/iter (± 753) 1.03
es2020_optional_chaining 96787 ns/iter (± 205) 95252 ns/iter (± 4350) 1.02
es2022_class_properties 95008 ns/iter (± 138) 92085 ns/iter (± 965) 1.03
es2018_object_rest_spread 72081 ns/iter (± 100) 69073 ns/iter (± 911) 1.04
es2019_optional_catch_binding 62259 ns/iter (± 125) 59589 ns/iter (± 681) 1.04
es2017_async_to_generator 62532 ns/iter (± 205) 61329 ns/iter (± 536) 1.02
es2016_exponentiation 65546 ns/iter (± 312) 64695 ns/iter (± 516) 1.01
es2015_arrow 70597 ns/iter (± 369) 68627 ns/iter (± 927) 1.03
es2015_block_scoped_fn 67178 ns/iter (± 176) 64544 ns/iter (± 861) 1.04
es2015_block_scoping 159007 ns/iter (± 8556) 148045 ns/iter (± 10091) 1.07
es2015_classes 116766 ns/iter (± 239) 112585 ns/iter (± 935) 1.04
es2015_computed_props 62021 ns/iter (± 165) 61431 ns/iter (± 564) 1.01
es2015_destructuring 116694 ns/iter (± 354) 114111 ns/iter (± 1543) 1.02
es2015_duplicate_keys 64063 ns/iter (± 234) 61946 ns/iter (± 777) 1.03
es2015_parameters 79758 ns/iter (± 206) 78482 ns/iter (± 938) 1.02
es2015_fn_name 67461 ns/iter (± 351) 65744 ns/iter (± 415) 1.03
es2015_for_of 65333 ns/iter (± 134) 63435 ns/iter (± 829) 1.03
es2015_instanceof 64448 ns/iter (± 366) 62048 ns/iter (± 881) 1.04
es2015_shorthand_property 62195 ns/iter (± 87) 59785 ns/iter (± 800) 1.04
es2015_spread 61853 ns/iter (± 94) 59218 ns/iter (± 701) 1.04
es2015_sticky_regex 63224 ns/iter (± 105) 60319 ns/iter (± 704) 1.05
es2015_typeof_symbol 63299 ns/iter (± 194) 61106 ns/iter (± 658) 1.04
es/transform/baseline/base 52697 ns/iter (± 124) 49997 ns/iter (± 649) 1.05
es/transform/baseline/common_reserved_word 63611 ns/iter (± 164) 60641 ns/iter (± 727) 1.05
es/transform/baseline/common_typescript 159435 ns/iter (± 6815) 143828 ns/iter (± 6452) 1.11
es/target/es3 169611 ns/iter (± 648) 164841 ns/iter (± 1902) 1.03
es/target/es2015 628277 ns/iter (± 1569) 616801 ns/iter (± 7271) 1.02
es/target/es2016 65883 ns/iter (± 214) 63499 ns/iter (± 676) 1.04
es/target/es2017 62345 ns/iter (± 260) 61277 ns/iter (± 780) 1.02
es/target/es2018 82259 ns/iter (± 139) 80026 ns/iter (± 707) 1.03
es/target/es2020 133552 ns/iter (± 308) 130600 ns/iter (± 1505) 1.02
babelify-only 668489 ns/iter (± 3717) 660520 ns/iter (± 4555) 1.01
parse_and_babelify_angular 44292620 ns/iter (± 719166) 45057259 ns/iter (± 1822272) 0.98
parse_and_babelify_backbone 5363281 ns/iter (± 53259) 5467874 ns/iter (± 173182) 0.98
parse_and_babelify_jquery 31286666 ns/iter (± 289212) 32086131 ns/iter (± 1020124) 0.98
parse_and_babelify_jquery_mobile 53277640 ns/iter (± 961952) 56388284 ns/iter (± 2305643) 0.94
parse_and_babelify_mootools 32292757 ns/iter (± 277394) 32920843 ns/iter (± 1271489) 0.98
parse_and_babelify_underscore 4357686 ns/iter (± 21840) 4504311 ns/iter (± 88542) 0.97
parse_and_babelify_yui 31439164 ns/iter (± 569790) 33619050 ns/iter (± 1476391) 0.94
html/minify/document/css_spec 41548140 ns/iter (± 272018) 40613197 ns/iter (± 621757) 1.02
html/minify/document/github 17396998 ns/iter (± 73514) 17130986 ns/iter (± 157198) 1.02
html/minify/document/stackoverflow 15634205 ns/iter (± 38790) 15427473 ns/iter (± 216490) 1.01
html/minify/document_fragment/css_spec 39853179 ns/iter (± 98953) 39014086 ns/iter (± 641243) 1.02
html/minify/document_fragment/github 16778707 ns/iter (± 25285) 16423018 ns/iter (± 138916) 1.02
html/minify/document_fragment/stackoverflow 15106397 ns/iter (± 47420) 15356481 ns/iter (± 141996) 0.98
html/document/visitor/compare/clone 342278 ns/iter (± 2862) 340685 ns/iter (± 2357) 1.00
html/document/visitor/compare/visit_mut_span 366928 ns/iter (± 2674) 368219 ns/iter (± 2475) 1.00
html/document/visitor/compare/visit_mut_span_panic 376974 ns/iter (± 2252) 369828 ns/iter (± 5111) 1.02
html/document/visitor/compare/fold_span 405451 ns/iter (± 2228) 400818 ns/iter (± 5257) 1.01
html/document/visitor/compare/fold_span_panic 462167 ns/iter (± 1155) 461384 ns/iter (± 2283) 1.00
html/document_fragment/visitor/compare/clone 338961 ns/iter (± 2388) 335302 ns/iter (± 3672) 1.01
html/document_fragment/visitor/compare/visit_mut_span 370135 ns/iter (± 2156) 359494 ns/iter (± 4908) 1.03
html/document_fragment/visitor/compare/visit_mut_span_panic 371806 ns/iter (± 2548) 366594 ns/iter (± 4299) 1.01
html/document_fragment/visitor/compare/fold_span 404181 ns/iter (± 1960) 402130 ns/iter (± 4196) 1.01
html/document_fragment/visitor/compare/fold_span_panic 463403 ns/iter (± 2350) 459457 ns/iter (± 4625) 1.01
html/lexer/css_2021_spec 17319610 ns/iter (± 11896) 15579411 ns/iter (± 118111) 1.11
html/lexer/github_com_17_05_2022 6430128 ns/iter (± 3443) 6008783 ns/iter (± 38404) 1.07
html/lexer/stackoverflow_com_17_05_2022 6253764 ns/iter (± 2677) 5554457 ns/iter (± 65281) 1.13
html/parser/parser_document/css_2021_spec 25573768 ns/iter (± 158481) 25143445 ns/iter (± 426763) 1.02
html/parser/parser_document/github_com_17_05_2022 8797163 ns/iter (± 16709) 8714031 ns/iter (± 95799) 1.01
html/parser/parser_document/stackoverflow_com_17_05_2022 7739123 ns/iter (± 5252) 7619497 ns/iter (± 80595) 1.02
html/parser/parser_document_fragment/css_2021_spec 26312587 ns/iter (± 313589) 25402491 ns/iter (± 473345) 1.04
html/parser/parser_document_fragment/github_com_17_05_2022 8817957 ns/iter (± 18622) 8695406 ns/iter (± 108693) 1.01
html/parser/parser_document_fragment/stackoverflow_com_17_05_2022 7787356 ns/iter (± 28907) 7569064 ns/iter (± 107328) 1.03

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

Please sign in to comment.