![]() |
1 year ago | |
---|---|---|
.. | ||
LICENSE | 1 year ago | |
README.md | 1 year ago | |
conf.h | 1 year ago | |
turbob64.h | 1 year ago | |
turbob64_.h | 1 year ago | |
turbob64avx2.c | 1 year ago | |
turbob64c.c | 1 year ago | |
turbob64d.c | 1 year ago | |
turbob64sse.c | 1 year ago | |
ya.make | 1 year ago |
E Size | ratio% | E MB/s | D MB/s | Name | 1MB binary 2019.12 |
---|---|---|---|---|---|
1333336 | 133.3 | 16329 | 26032 | TB64avx2 | Turbo Base64 avx2 |
1333336 | 133.3 | 9920 | 16207 | TB64avx | Turbo Base64 avx |
1333336 | 133.3 | 8891 | 12132 | TB64sse | Turbo Base64 sse |
1333336 | 133.3 | 12973 | 13986 | fb64avx2 | Fastbase64 avx2 |
1333336 | 133.3 | 12962 | 13970 | b64avx2 | Base64 avx2 |
1333336 | 133.3 | 8392 | 8717 | b64avx | Base64 avx |
1333336 | 133.3 | 6899 | 7477 | b64sse | Base64 sse41 |
1000000 | 100.0 | 29934 | 29992 | memcpy |
E Size | ratio% | E MB/s | D MB/s | Name | 20MB binary 2019.12 |
---|---|---|---|---|---|
26666668 | 133.3 | 8920 | 12706 | TB64avx2 | Turbo Base64 avx2 |
26666668 | 133.3 | 8466 | 12401 | TB64avx | Turbo Base64 avx |
26666668 | 133.3 | 8103 | 11291 | TB64sse | Turbo Base64 sse |
26666668 | 133.3 | 7795 | 10452 | fb64avx2 | Fastbase64 avx2 |
26666668 | 133.3 | 7809 | 10381 | b64avx2 | Base64 avx2 |
26666668 | 133.3 | 7161 | 8172 | b64avx | Base64 avx |
26666668 | 133.3 | 6420 | 7042 | b64sse | Base64 sse41 |
26666668 | 133.3 | 3925 | 4281 | TB64x | Turbo Base64 scalar |
26666668 | 133.3 | 1840 | 3320 | b64plain | Base64 plain |
26666668 | 133.3 | 1908 | 2752 | TB64s | Turbo Base64 scalar |
26666668 | 133.3 | 1522 | 3198 | chrome | Google Chrome base64 |
26666668 | 133.3 | 1871 | 1612 | fb64plain | FastBase64 plain |
26666668 | 133.3 | 1122 | 816 | quicktime | Apple Quicktime base64 |
27083334 | 135.4 | 1100 | 178 | linux | Linux base64 |
20000000 | 100.0 | 14432 | 14464 | memcpy |
TurboBase64 vs. Base64 for short strings (incl. checking) |String length|E MB/s|D MB/s|Name|1MB short strings 2020.01 | |------------:|--------:|--------:|----------------|----------------| | 4 - 16 |1682|1843|TB64avx2|Turbo Base64 avx2| | |559|622|b64avx2|Base64 avx2| | 8 - 32 |2835|2965|TB64avx2|Turbo Base64 avx2| | |838|818|b64avx2|Base64 avx2| | 16 - 64 |4623|4893|TB64avx2|Turbo Base64 avx2| | |1555|1229|b64avx2|Base64 avx2| | 32 - 128 |7218|7533|TB64avx2|Turbo Base64 avx2| | |2955|2365|b64avx2|Base64 avx2|
E Size | ratio% | E MB/s | D MB/s | Name | 30MB binary 2019.12 |
---|---|---|---|---|---|
40000000 | 133.3 | 2026 | 1650 | TB64neon | Turbo Base64 Neon |
40000000 | 133.3 | 1795 | 1285 | b64neon64 | Base64 Neon |
40000000 | 133.3 | 1270 | 1095 | TB64x | Turbo Base64 scalar |
40000000 | 133.3 | 695 | 965 | TB64s | Turbo Base64 scalar |
40000000 | 133.3 | 512 | 782 | fb64neon | Fastbase64 SIMD Neon |
40000000 | 133.3 | 565 | 460 | Chrome | Google Chrome base64 |
40000000 | 133.3 | 642 | 614 | b64plain | Base64 plain |
40000000 | 133.3 | 506 | 548 | fb64plain | Fastbase64 plain |
40500000 | 135.4 | 314 | 91 | Linux | Linux base64 |
30000000 | 100.0 | 3820 | 3834 | memcpy |
(bold = pareto in category) MB=1.000.000
(E/D) : Encode/Decode
git clone git://github.com/powturbo/TurboBase64.git
make
./tb64app file
or
./tb64app
static inline unsigned turbob64len(unsigned n)
Base64 output length after encoding
unsigned tb64enc(const unsigned char *in, unsigned inlen, unsigned char *out)
Encode binary input 'in' buffer into base64 string 'out'<br /> with automatic cpu detection for simd and switch (sse/avx2/scalar<br /> **in** : Input buffer to encode<br /> **inlen** : Length in bytes of input buffer<br /> **out** : Output buffer<br /> **return value**: Length of output buffer<br /> **Remark** : byte 'zero' is not written to end of output stream<br /> Caller must add 0 (out[outlen] = 0) for a null terminated string<br />
unsigned tb64dec(const unsigned char *in, unsigned inlen, unsigned char *out)
Decode base64 input 'in' buffer into binary buffer 'out' <br /> **in** : input buffer to decode<br /> **inlen** : length in bytes of input buffer <br /> **out** : output buffer<br /> **return value**: >0 output buffer length<br /> 0 Error (invalid base64 input or input length = 0)<br />
Last update: 03 MAR 2020