Transcoding unicode characters with AVX‐512 instructions
Authors:
Open Access
- 12 September 2023
- journal article
- research article
- Published by Wiley in Software: Practice and Experience
- Vol. 53 (12) , 2430-2462
Abstract
Intel includes in its recent processors a powerful set of instructions capable of processing 512‐bit registers with a single instruction (AVX‐512). Some of these instructions have no equivalent in earlier instruction sets. We leverage these instructions to efficiently transcode strings between the most common formats: UTF‐8 and UTF‐16. With our novel algorithms, we are often twice as fast as the previous best solutions. For example, we transcode Chinese text from UTF‐8 to UTF‐16 at more than 5 GiB using fewer than 2 CPU instructions per character. To ensure reproducibility, we make our software freely available as an open‐source library. Our library is part of the popular Node.js JavaScript runtime.Keywords
Funding Information
- Natural Sciences and Engineering Research Council of Canada (RGPIN‐2017‐03910)
This publication has 8 references indexed in Scilit:
- uiCA2022
- Transcoding billions of Unicode characters per second with SIMD instructionsSoftware: Practice and Experience, 2021
- Systems research is running out of time2021
- Validating UTF‐8 in less than one instruction per byteSoftware: Practice and Experience, 2020
- uops.info2019
- A case study in SIMD text processing with parallel bit streams2008
- UTF-8, a transformation format of ISO 106462003
- UTF-16, an encoding of ISO 106462000