Chris Wellons personal blog
A Branchless UTF-8 Decoder
This week I took a crack at writing a branchless UTF-8 decoder: a function that decodes a single UTF-8 code point from a byte stream without any if statements, loops, short-circuit operators, or other sorts of conditional jumps. You can find the source code here along with a test suite and benchmark:
- Points
- 303
- HN comments
- 107
- Submissions
- 1
- Cited by
- 0 commenters
Software EngineeringMath & Algorithms2017
On Hacker News
| Submitted | Title on HN | Points | Comments |
|---|---|---|---|
| Oct 7, 2017 | A Branchless UTF-8 Decoder by zdw | 303 | 107 |