Base64 encoding and decoding at almost the speed of a memory copy

tosh1 pts0 comments

[1910.05109] Base64 encoding and decoding at almost the speed of a memory copy

-->

Computer Science > Distributed, Parallel, and Cluster Computing

arXiv:1910.05109 (cs)

[Submitted on 2 Oct 2019]

Title:Base64 encoding and decoding at almost the speed of a memory copy

Authors:Wojciech Muła, Daniel Lemire<br>View a PDF of the paper titled Base64 encoding and decoding at almost the speed of a memory copy, by Wojciech Mu{\l}a and 1 other authors

View PDF

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.

Subjects:

Distributed, Parallel, and Cluster Computing (cs.DC)

Cite as:<br>arXiv:1910.05109 [cs.DC]

(or<br>arXiv:1910.05109v1 [cs.DC] for this version)

https://doi.org/10.48550/arXiv.1910.05109

Focus to learn more

arXiv-issued DOI via DataCite

Journal reference:<br>Software: Practice and Experience 50 (2), 2020

Related DOI:

https://doi.org/10.1002/spe.2777

Focus to learn more

DOI(s) linking to related resources

Submission history<br>From: Daniel Lemire [view email]<br>[v1]<br>Wed, 2 Oct 2019 15:39:28 UTC (88 KB)

Full-text links:<br>Access Paper:

View a PDF of the paper titled Base64 encoding and decoding at almost the speed of a memory copy, by Wojciech Mu{\l}a and 1 other authors<br>View PDF<br>TeX Source

view license

Current browse context:

cs.DC

next >

new<br>recent<br>| 2019-10

Change to browse by:

cs

References & Citations

NASA ADS<br>Google Scholar

Semantic Scholar

DBLP - CS Bibliography

listing | bibtex

Wojciech Mula<br>Daniel Lemire

export BibTeX citation<br>Loading...

BibTeX formatted citation

&times;

loading...

Data provided by:

Bookmark

Bibliographic Tools

Bibliographic and Citation Tools

Bibliographic Explorer Toggle

Bibliographic Explorer (What is the Explorer?)

Connected Papers Toggle

Connected Papers (What is Connected Papers?)

Litmaps Toggle

Litmaps (What is Litmaps?)

scite.ai Toggle

scite Smart Citations (What are Smart Citations?)

Code, Data, Media

Code, Data and Media Associated with this Article

alphaXiv Toggle

alphaXiv (What is alphaXiv?)

Links to Code Toggle

CatalyzeX Code Finder for Papers (What is CatalyzeX?)

DagsHub Toggle

DagsHub (What is DagsHub?)

GotitPub Toggle

Gotit.pub (What is GotitPub?)

Huggingface Toggle

Hugging Face (What is Huggingface?)

ScienceCast Toggle

ScienceCast (What is ScienceCast?)

Demos

Demos

Replicate Toggle

Replicate (What is Replicate?)

Spaces Toggle

Hugging Face Spaces (What is Spaces?)

Spaces Toggle

TXYZ.AI (What is TXYZ.AI?)

Related Papers

Recommenders and Search Tools

Link to Influence Flower

Influence Flower (What are Influence Flowers?)

Core recommender toggle

CORE Recommender (What is CORE?)

Author

Venue

Institution

Topic

About arXivLabs

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs .

Which authors of this paper are endorsers? |<br>Disable MathJax (What is MathJax?)

toggle base64 arxiv data encoding speed

Related Articles