# Benchmarks (Taffy 0.3 and Yoga) - Taffy `0.2` results come from commit `456653c2c618ea2b3390c4d717c38edbdf684ae4` - Taffy `0.3` and Yoga results come from commit `71027a8de03b343e120852b84bb7dca9fb4651c5` - Yoga benchmarks are run using version `0.4.0` of the `yoga` crate - Run on a 2021 MacBook Pro with M1 Pro processor. - Taffy benchmarks are using criterion (10 iterations). ## Flexbox Benchmarks | Benchmark | Yoga | Taffy 0.2 | Taffy 0.3 | % change (0.2 -> 0.3) | | --- | --- | --- | --- | --- | | yoga/1_000 nodes (3-level hierarchy) | 402.58 µs | 364.60 µs | 329.04 µs | - | | yoga/10_000 nodes (4-level hierarchy) | 4.1988 ms | 3.6236 ms | 4.3486 ms | +20.01% | | yoga/100_000 nodes (5-level hierarchy) | 45.804 ms | 39.467 ms | 38.559 ms | - | | wide/1_000 nodes (2-level hierarchy) | 737.77 µs | 470.52 µs | 505.99 µs | - | | wide/10_000 nodes (2-level hierarchy) | 7.1007 ms | 7.1008 ms | 8.3395 ms | +17.44% | | wide/100_000 nodes (2-level hierarchy) | 135.78 ms | 241.34 ms | 247.42 ms | - | | deep/4000 nodes (12-level hierarchy)) | 2.2333 ms | 4.7362 ms | 1.7400 ms | -63.26% | | deep/10_000 nodes (14-level hierarchy) | 5.9477 ms | 10.729 ms | 4.4445 ms | -58.57% | | deep/100_000 nodes (17-level hierarchy) | 76.755 ms | 151.53 ms | 63.778 ms | -57.91% | | super-deep/1000 nodes (1000-level hierarchy) | 555.32 µs | 1.6444 ms | 472.85 µs | -71.24% | ## CSS Grid Benchmarks `NxN/12345` signifies that each node is an N by N grid, and that there are 12345 total nodes in the tree. | Benchmark | Taffy 0.3 | | --- | --- | | grid/wide/31x31/961 | 491.65 µs | | grid/wide/100x100/10000 | 7.0741 ms | | grid/wide/316x316/99856 | 104.54 ms | | grid/deep/2x2/1024 | 1.6624 ms | | grid/deep/3x3/6561 | 8.1927 ms | | grid/deep/2x2/16384 | 32.700 ms | | grid/superdeep/1x1/100 | 172.83 µs | | grid/superdeep/1x1/1000 | 2.0197 ms |