basE91 vs Base64 Simple Benchmark

3 min

language: ja bn en es hi pt ru zh-cn zh-tw

Version

For more details, please run 'base64 --help'.
alleycat:[haturatu]:~$ base64 --version
base64 (GNU coreutils) 9.5
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Author Simon Josefsson.
alleycat:[haturatu]:~$ base91 --version
base91 0.6.0
Copyright (c) 2000-2006 Joachim Henke

Benchmark

A very simple one

alleycat:[haturatu]:~$ time for i in {1..10000}; do echo "test" | base91 ; done > 91

real    0m11.381s
user    0m10.460s
sys     0m5.118s
alleycat:[haturatu]:~$ time for i in {1..10000}; do echo "test" | base64 ; done > 64

real    0m11.985s
user    0m10.787s
sys     0m5.219s
alleycat:[haturatu]:~$ time for i in {1..10000}; do echo "test" | base91 ; done > 91

real    0m11.569s
user    0m10.640s
sys     0m5.071s
alleycat:[haturatu]:~$ time for i in {1..10000}; do echo "test" | base64 ; done > 64

real    0m11.864s
user    0m10.725s
sys     0m5.189s

Background

I found the following in a mailing list archive:
Bug#706078: ITP: base91 – base91 encoder/decoder

It amounts at most to 23% (versus 33% for base64) and can range down to 14%, which typically occurs on 0-byte blocks. This makes basE91 very useful for transferring larger files over binary insecure connections like e-mail or terminal lines.

I wonder if this counts as verification...

Everyone's favorite bonus corner.
There weren't many simple basE91 generators available in browsers, so... basE91 Encode/Decode

Related Posts