Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore a fast and efficient approach to UTF-8 conversion using C++, Deterministic Finite Automata (DFAs), and SSE intrinsics in this conference talk from C++Now 2018. Dive into the intricacies of UTF-8, UTF-16, and UTF-32 encodings, understanding code units and code points. Learn how to construct a DFA for optimal UTF-8 conversion, implement the algorithm using simple lookup tables and C++ code, and leverage SSE intrinsics for enhanced performance. Compare this method with common implementations on Windows and Linux, demonstrating significant speed improvements. Gain insights into handling overlong and invalid byte sequences, optimizing ASCII conversion, and utilizing static member functions and data structures for efficient processing.
Syllabus
Introduction
Overview
Code Units
Encoding
Code Point
Character Sets
Universal Character Set
Unicode
bits
valid sequences
overlong sequences
boundary conditions
How does my converter work
Assumptions
Static Member Functions
States
Data Structures
Arrays
Basic Conversion
Benchmarks
ASCII Optimization
How does this work
Counting trailing zeros
DFA cycle
Input data
Libraries
Timings
Taught by
CppNow