We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cb4e7d commit dccbf42Copy full SHA for dccbf42
library/std/benches/path.rs
@@ -55,6 +55,17 @@ fn bench_path_cmp_fast_path_short(b: &mut test::Bencher) {
55
});
56
}
57
58
+#[bench]
59
+fn bench_path_components_iter(b: &mut test::Bencher) {
60
+ let p = Path::new("/my/home/is/my/castle/and/my/castle/has/a/rusty/workbench/");
61
+
62
+ b.iter(|| {
63
+ for c in black_box(p).components() {
64
+ black_box(c);
65
+ }
66
+ })
67
+}
68
69
#[bench]
70
#[cfg_attr(miri, ignore)] // Miri isn't fast...
71
fn bench_path_hashset(b: &mut test::Bencher) {
0 commit comments