Skip to content

basenc: add benchmark - #14022

Merged
sylvestre merged 1 commit into
uutils:mainfrom
myunbin:basenc-buf32k-bench
Aug 20, 2026
Merged

basenc: add benchmark#14022
sylvestre merged 1 commit into
uutils:mainfrom
myunbin:basenc-buf32k-bench

Conversation

@myunbin

@myunbin myunbin commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This PR extends #13885 .

Base16 encoding currently writes output in small chunks(~2 KiB).
Buffer these writes with a 32 KiB BufWriter to reduce the number of write system calls.

Benchmarks for /dev/null and regular-file output are also included.

However, I kept input buffer at 8 KiB. It is shared by all formats, including Base32 and 64. Increasing it would also increase their memory usage. I can set it to 32 KiB, as in #13885, if preferred.

Thanks!

Comment thread src/uu/base32/src/base_common.rs Outdated
@myunbin
myunbin force-pushed the basenc-buf32k-bench branch from 8626e68 to 566f2ff Compare August 19, 2026 08:58
@sylvestre sylvestre changed the title basenc: buffer base16 encoded output(include benchmark) basenc: add benchmark Aug 19, 2026
@oech3

oech3 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Note that CodSpeed does not measure time by syscalls.

@myunbin

myunbin commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@oech3

Wasn’t aware of that. Would it make sense to add CodSpeed walltime benchmarks to CI for I/O-bound tasks?

@sylvestre
sylvestre merged commit f7a27d5 into uutils:main Aug 20, 2026
163 of 168 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants