Skip to content

Commit d7781b1

Browse files
committed
Add RustyXML to comparison
Usages: 63 (16 direct) according to https://lib.rs/crates/RustyXML
1 parent dda8879 commit d7781b1

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

compare/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ criterion = "0.3"
1111
maybe_xml = "0.2"
1212
quick-xml = { path = "..", features = ["serialize"] }
1313
rapid-xml = "0.2"
14+
rusty_xml = { version = "0.3", package = "RustyXML" }
1415
xml_oxide = "0.3"
1516
xml-rs = "0.8"
1617
xml5ever = "0.17"

compare/benches/bench.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,24 @@ fn low_level_comparison(c: &mut Criterion) {
8787
})
8888
});
8989

90+
group.bench_function("RustyXML", |b| {
91+
use rusty_xml::{Event, Parser};
92+
93+
b.iter(|| {
94+
let mut r = Parser::new();
95+
r.feed_str(SOURCE);
96+
97+
let mut count = criterion::black_box(0);
98+
for event in r {
99+
match event.unwrap() {
100+
Event::ElementStart(_) => count += 1,
101+
_ => (),
102+
}
103+
}
104+
assert_eq!(count, 1550, "Overall tag count in ./tests/sample_rss.xml");
105+
})
106+
});
107+
90108
group.bench_function("xml_oxide", |b| {
91109
use xml_oxide::sax::parser::Parser;
92110
use xml_oxide::sax::Event;

0 commit comments

Comments
 (0)