Re:Avoid character-by-character processing when performance ...
by P-ala-din on Saturday July 25, 2020 @07:20AM
(#23948353)
A thing I want to stress, is that you pay for the "complexity" just once, and it gets amortized over all projects that use this code.
This is a standard technique, that is often used in String functions. You can see it also in implementations of strlen.
Second, even the slow case is 2 GB/s. While the principle is helpful, the extra complexity may not be worth it in the vast majority of real life code.