servo/components/layout_2020/flow
Jonathan Schwender 5533092ab3
Reduce allocations in layout_block_level_children_in_parallel (#35781)
This function showed up as a top producer of allocations
(around 10% of all allocations).
Allocating the vector once upfront and using
`collect_into_vec` removes any intermediate allocations.
This approach is also recommended by the rayon documentation:
https://docs.rs/rayon/1.10.0/rayon/iter/trait.ParallelIterator.html#method.collect

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-03-04 07:48:12 +00:00
..
inline Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
construct.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
float.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
mod.rs Reduce allocations in layout_block_level_children_in_parallel (#35781) 2025-03-04 07:48:12 +00:00
root.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00