Optimize `save_report_lines` a bit

#62
Comparing
swatinem/opt-save
(
7b80699
) with
main
(
06b8472
)
CodSpeed Performance Gauge
+2%
Improvements
0
Regressions
0
Untouched
4
New
0
Dropped
0
Ignored
0

Benchmarks

Passed

simple_chunks
core/benches/pyreport.rs::benches::simple_chunks::simple_chunks
CodSpeed Performance Gauge
+6%
62.1 µs
58.4 µs
complex_chunks
core/benches/pyreport.rs::benches::complex_chunks::complex_chunks
CodSpeed Performance Gauge
+4%
13.9 s
13.4 s
complex_report_json
core/benches/pyreport.rs::benches::complex_report_json::complex_report_json
CodSpeed Performance Gauge
0%
98.3 ms
98.3 ms
simple_report_json
core/benches/pyreport.rs::benches::simple_report_json::simple_report_json
CodSpeed Performance Gauge
0%
32.8 µs
32.9 µs

Commits

Click on a commit to change the comparison range
Base
main
06b8472
+2%
Optimize `save_report_lines` a bit This avoids some intermediate allocations in particular for a `flag_map` case, as well as avoiding another allocation. In other cases its unfortunately not possible to avoid more intermediate allocations.
7b80699
5 months ago
by Swatinem
© 2025 CodSpeed Technology