pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/simdutf/simdutf/pull/947

om/assets/global-68dd150ce6c8e711.css" /> Better fastbase64 + man pages by lemire · Pull Request #947 · simdutf/simdutf · GitHub
Skip to content

Better fastbase64 + man pages#947

Open
lemire wants to merge 12 commits intomasterfrom
bettertools
Open

Better fastbase64 + man pages#947
lemire wants to merge 12 commits intomasterfrom
bettertools

Conversation

@lemire
Copy link
Member

@lemire lemire commented Mar 13, 2026

This makes fastbase64 somewhat equivalent to standard base64. Unfortunately, the GNU base64 and the non-GNU base64 tools differ. It tried to come up with some kind of hybrid that can emulate the two.

Apple M4 Benchmark Results (times in milliseconds):

Size Encode Base64 Encode FastBase64 Decode Base64 Decode FastBase64
1m 23.5 23.2 37.7 23.1
10m 31.3 24.4 167.6 24.0
100m 115.6 50.4 1430.2 53.7

x64 Linux Benchmark Results (times in milliseconds):

Size Encode Base64 Encode FastBase64 Decode Base64 Decode FastBase64
1m 12.1 11.8 13.8 11.8
10m 25.8 18.7 39.6 17.5
100m 187.0 100.5 290.3 77.7

So for inputs that are 10 MB or larger, it pays to use fastbase64. For small inputs, the time is dominated by the process overhead.

The Apple base64 decoder is quite slow, so that's one use case where we may want to use fastbase64.

Fixes #907

Fixes #908

@lemire lemire requested a review from pauldreik March 13, 2026 21:44
@pauldreik
Copy link
Collaborator

I think it would be great to provide a drop in replacement for gnu coreutils.
We could provide a bash script wrapper fastbase64.coreutilscompat that parses command line parameters and uses defaults that exactly matches gnu coreutils.

then, it would be possible for users to either use an alias in .bashrc to get some nice speedup.

the same thing could be done for mac/bsd, I assume?

@lemire
Copy link
Member Author

lemire commented Mar 15, 2026

@pauldreik

I think it would be great to provide a drop in replacement for gnu coreutils.

I think that the only difference is the meaning of the flag -i.

We have a few options.

  1. Add an intermediate script as you suggest.
  2. Generate two binaries, one with GNU commands, one with BSD convention.
  3. Focus solely on the GNU convention.
  4. Stick with what I did which is mostly cross-compatible except that Linux users must not use -i.

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.

make fastbase64 functionally equivalent to the standard base64 command provide man pages for fastbase64 and sutf

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy