-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
basenc: perform faster, streaming encoding #6719
base: main
Are you sure you want to change the base?
Conversation
Improve the performance, both in memory and time, of the encoding performed by the basenc (except in --z85 mode), base32, and base64 programs. These programs now perform encoding in a buffered/streaming manner, so encoding is not constrained by the amount of available memory.
Setup
No wrappingNew implementationElapsed (wall clock) time (h:mm:ss or m:ss): 0:00.70
Existing implementationElapsed (wall clock) time (h:mm:ss or m:ss): 0:01.99
GNU Core Utilities's implementationElapsed (wall clock) time (h:mm:ss or m:ss): 0:00.72
Default wrapping (76 characters)New implementationElapsed (wall clock) time (h:mm:ss or m:ss): 0:03.40
Existing implementationElapsed (wall clock) time (h:mm:ss or m:ss): 0:08.04
GNU Core Utilities's implementationElapsed (wall clock) time (h:mm:ss or m:ss): 0:00.99
|
GNU testsuite comparison:
|
Please use hyperfine for benchmarking. Time isn't reliable enough for performances |
(Was having trouble getting
No wrappingpoopNew implementation
Existing implementation
hyperfineNew implementation
Existing implementation
|
you should call hyperfine once with the old and new implementation |
No wrapping
Default wrapping (76 characters)
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
Improve the performance, both in memory and time, of the encoding performed by the basenc (except in --z85 mode), base32, and base64 programs.
These programs now perform encoding in a buffered/streaming manner, so encoding is not constrained by the amount of available memory.