Skip to content

basenc: add benchmark - #14022

Open
myunbin wants to merge 1 commit into
uutils:mainfrom
myunbin:basenc-buf32k-bench
Open

basenc: add benchmark#14022
myunbin wants to merge 1 commit into
uutils:mainfrom
myunbin:basenc-buf32k-bench

Conversation

@myunbin

@myunbin myunbin commented Aug 19, 2026

Copy link
Copy Markdown

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.

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