TL;DR
This paper presents a highly optimized base64 encoding and decoding method using AVX-512 SIMD instructions, achieving speeds close to memory copy operations on modern Intel processors, especially for data not fitting in L1 cache.
Contribution
The authors develop a SIMD-accelerated base64 codec that is faster, simpler, and adaptable to different variants, outperforming previous implementations.
Findings
Achieves near-memory-copy speed for base64 encoding/decoding on Intel CPUs.
Uses fewer instructions than previous SIMD-based codecs.
Can be adapted to any base64 variant at runtime.
Abstract
Many common document formats on the Internet are text-only such as email (MIME) and the Web (HTML, JavaScript, JSON and XML). To include images or executable code in these documents, we first encode them as text using base64. Standard base64 encoding uses 64~ASCII characters: both lower and upper case Latin letters, digits and two other symbols. We show how we can encode and decode base64 data at nearly the speed of a memory copy (memcpy) on recent Intel processors, as long as the data does not fit in the first-level (L1) cache. We use the SIMD (Single Instruction Multiple Data) instruction set AVX-512 available on commodity processors. Our implementation generates several times fewer instructions than previous SIMD-accelerated base64 codecs. It is also more versatile, as it can be adapted---even at runtime---to any base64 variant by only changing constants.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
