PofoliaShared via Pofolia

ACM Transactions on Architecture and Code Optimization· 2026Q2

Fast Forgiving Base64 Decoding with SIMD Instructions

Daniel Lemire A

Short summary

A new block-oriented SIMD algorithm decodes Base64 text, ignoring ASCII whitespace within the SIMD loop, achieving up to 94GB/s on AMD Zen 5 processors and boosting Node.js Uint8Array.fromBase64 throughput by 6x.

AI-generated from the title and abstract; the full text is not read.

Key points

  • Introduces a block-oriented SIMD Base64 decoding algorithm that handles ignorable ASCII whitespace within the SIMD loop.
  • Achieves decoding speeds up to 94GB/s on AMD Zen 5 processors using x64 (SSSE3-AVX-512 VBMI2), ARM NEON, and LoongArch implementations.
  • Boosts Node.js Uint8Array.fromBase64 throughput by up to 6x compared to older versions.
  • The implementation has been adopted by major browsers and JavaScript runtimes.

AI-generated from the title and abstract; the full text is not read.

Abstract

On the Internet, we use the Base64 format to represent binary data (e.g., images or cryptographic keys) as text. The ES2026 JavaScript standard, following the WHATWG forgiving-base64 rules, requires decoders to ignore ASCII whitespace while rejecting other non-alphabet characters. Prior SIMD Base64 decoders assume whitespace-free input. We present a block-oriented decoding algorithm that removes whitespace inside the SIMD loop: clean 64-character blocks are decoded directly, while blocks with ignorable characters are compacted into a small stack buffer. We provide implementations for x64 (SSSE3 through AVX-512 VBMI2), ARM NEON, and LoongArch. Our C++ decoder reaches up to 94GB s − 1 on recent AMD Zen 5 processors. In Node.js 25, integration of our decoder raises Uint8Array.fromBase64 throughput by up to 6 × compared with Node.js 19. The implementation has been adopted by major browsers and JavaScript runtimes.

The authors' abstract, as published at the source. ACM Transactions on Architecture and Code Optimization, 2026 · DOI ↗

TakeawaysPremium
Ask the paperFree account

Continue with a free account

Ask the paper: 3 free questions a day about this paper; save it, get its citation, new summaries every day for your field. Takeaways are Premium.

Continue free on the web

Sign in with Google or Apple; no card needed. You come back to this paper.

On your phone:

Field: Hardware and Architecture

Hardware and ArchitectureComputer Science