basenc: buffer base16 encoded output - #13885
Conversation
Merging this PR will degrade performance by 31.56%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | b64_decode_ignore_garbage_synthetic |
12.1 KB | 36.1 KB | -66.46% |
| ❌ | Memory | b64_decode_synthetic |
12.1 KB | 36.1 KB | -66.46% |
| ❌ | Simulation | du_max_depth_balanced_tree[(6, 4, 10)] |
62.1 ms | 65.2 ms | -4.75% |
| ❌ | Simulation | du_summarize_balanced_tree[(5, 4, 10)] |
16 ms | 16.7 ms | -4.23% |
| ❌ | Simulation | numfmt_large_numbers_si[10000] |
94.7 ms | 98.1 ms | -3.4% |
| ⚡ | Simulation | complex_relative_date |
330.2 µs | 318.6 µs | +3.65% |
| 🆕 | Memory | ptx_input_references_short_lines[100000] |
N/A | 222.2 MB | N/A |
| 🆕 | Memory | ptx_long_lines[100] |
N/A | 29.5 MB | N/A |
| 🆕 | Memory | ptx_short_lines[100000] |
N/A | 240.1 MB | N/A |
| 🆕 | Memory | ptx_input_references_long_lines[1000] |
N/A | 29.1 MB | N/A |
| 🆕 | Memory | ptx_tex[10000] |
N/A | 20.6 MB | N/A |
| 🆕 | Simulation | ptx_input_references_short_lines[100000] |
N/A | 16.2 s | N/A |
| 🆕 | Simulation | ptx_long_lines[100] |
N/A | 1.7 s | N/A |
| 🆕 | Simulation | ptx_short_lines[100000] |
N/A | 14 s | N/A |
| 🆕 | Simulation | ptx_input_references_long_lines[1000] |
N/A | 2.1 s | N/A |
| 🆕 | Simulation | ptx_tex[10000] |
N/A | 2.9 s | N/A |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing myunbin:basenc-bufwriter-32k (6196f97) with main (66cf72b)2
Footnotes
-
46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
No successful run was found on
main(e6561b5) during the generation of this report, so 66cf72b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
|
|
||
| // Fixed to 8 KiB (equivalent to `std::sys::io::DEFAULT_BUF_SIZE` on most targets) | ||
| pub const DEFAULT_BUF_SIZE: usize = 8 * 1024; | ||
| const BASE16_OUTPUT_BUFFER_SIZE: usize = 32 * 1024; |
There was a problem hiding this comment.
Can we align DEFAULT_BUF_SIZE to same size too?
There was a problem hiding this comment.
Aligned DEFAULT_BUF_SIZE to 32 KiB as well. Thanks!
4e52388 to
6196f97
Compare
|
In a new pr, could you please add a new benchmark covering these cases? Thanks |
|
GNU testsuite comparison: |
Base16 encoding currently writes output in small chunks(~2 KiB).
Buffer these writes with a 32 KiB
BufWriterto reduce the number of write system calls./dev/null