Get the latest tech news
Decoding UTF-8. Part III: Determining Sequence Length – A Lookup Table
Avoiding branching with the help of a lookup table
In part two, we saw how to determine sequence length and mentioned that there are ways to reduce branching. Avoiding branching doesn’t come for free: a 256-byte array is added to the.rodata section, which may negatively affect caching. In the next post, we’ll try to figure out a way to reduce branching without using a lookup table.
Or read this on Hacker News