Files
test/source
Aras Pranckevicius 8a75b54735 BLI: change timeit to use fmtlib instead of direct cout
Especially on windows, direct output to `cout` via `<<` is very expensive.
Instead, use fmtlib to do all formatting into a no-alloc `fmt::memory_buffer`,
and output that with one call to `cout`.

timeit utilities are not used much by default, but during development or
profiling one often uncomments macros like `DEBUG_TIME` that then enable
`SCOPED_TIMER` or `SCOPED_TIMER_AVERAGED`.

Having one `SCOPED_TIMER_AVERAGED` inside sequencer `draw_channels`, with
empty timeline and all default channels; the overhead in % of `draw_channels`
duration of said scoped timer before and after this change:

- Windows: 29% -> 5%
- Mac: 5.0% -> 4.4%

Pull Request: https://projects.blender.org/blender/blender/pulls/115233
2023-11-21 18:35:42 +01:00
..