File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -219,4 +219,26 @@ fn bench_top100(c: &mut Criterion) {
219219 } )
220220 } ) ;
221221 group. finish ( ) ;
222+
223+ let mut group = c. benchmark_group ( "parse-iri-normalize-top100" ) ;
224+ group. throughput ( Throughput :: Elements ( lines. len ( ) as u64 ) ) ;
225+ group. bench_function ( "fluent-uri" , |b| {
226+ b. iter ( || {
227+ for & line in & lines {
228+ if let Ok ( iri) = Iri :: parse ( line) {
229+ black_box ( iri. normalize ( ) ) ;
230+ }
231+ }
232+ } )
233+ } ) ;
234+ group. bench_function ( "iri-string" , |b| {
235+ b. iter ( || {
236+ for & line in & lines {
237+ if let Ok ( iri) = IriStr :: new ( line) {
238+ black_box ( iri. normalize ( ) . to_dedicated_string ( ) ) ;
239+ }
240+ }
241+ } )
242+ } ) ;
243+ group. finish ( ) ;
222244}
Original file line number Diff line number Diff line change @@ -37,3 +37,8 @@ parse-normalize-top100/url
3737 time: [41.405 ms 41.605 ms 41.824 ms]
3838parse-normalize-top100/ada-url
3939 time: [17.195 ms 17.329 ms 17.473 ms]
40+
41+ parse-iri-normalize-top100/fluent-uri
42+ time: [27.661 ms 27.769 ms 27.888 ms]
43+ parse-iri-normalize-top100/iri-string
44+ time: [108.81 ms 109.26 ms 109.74 ms]
You can’t perform that action at this time.
0 commit comments