Skip to content

Commit 073b749

Browse files
committed
Fix new benchmarks for AvailableSpace
1 parent 12eb82d commit 073b749

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

benches/big_tree.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,30 +79,29 @@ fn taffy_benchmarks(c: &mut Criterion) {
7979
let mut taffy = Taffy::new();
8080
let root = build_deep_hierarchy(&mut taffy, 100_000, 7);
8181

82-
b.iter(|| taffy.compute_layout(root, Size::NONE).unwrap())
82+
b.iter(|| taffy.compute_layout(root, Size::MAX_CONTENT).unwrap())
8383
});
8484

8585
group.bench_function("4000 nodes (12-level hierarchy)", |b| {
8686
let mut taffy = Taffy::new();
8787
let root = build_deep_hierarchy(&mut taffy, 4000, 2);
8888

89-
b.iter(|| taffy.compute_layout(root, Size::NONE).unwrap())
89+
b.iter(|| taffy.compute_layout(root, Size::MAX_CONTENT).unwrap())
9090
});
9191

92-
// Slow. To be enabled once performance improvements land.
93-
// group.bench_function("10_000 nodes (14-level hierarchy)", |b| {
94-
// let mut taffy = Taffy::new();
95-
// let root = build_deep_hierarchy(&mut taffy, 10_000, 2);
92+
group.bench_function("10_000 nodes (14-level hierarchy)", |b| {
93+
let mut taffy = Taffy::new();
94+
let root = build_deep_hierarchy(&mut taffy, 10_000, 2);
9695

97-
// b.iter(|| taffy.compute_layout(root, Size::NONE).unwrap())
98-
// });
96+
b.iter(|| taffy.compute_layout(root, Size::MAX_CONTENT).unwrap())
97+
});
9998

10099
// Slow. To be enabled once performance improvements land.
101100
// group.bench_function("100_000 nodes (17-level hierarchy)", |b| {
102101
// let mut taffy = Taffy::new();
103102
// let root = build_deep_hierarchy(&mut taffy, 100_000, 2);
104103

105-
// b.iter(|| taffy.compute_layout(root, Size::NONE).unwrap())
104+
// b.iter(|| taffy.compute_layout(root, Size::MAX_CONTENT).unwrap())
106105
// });
107106
}
108107

0 commit comments

Comments
 (0)