← Back to context Comment by simonask 5 months ago Strings typically consist of UTF-8 bytes, and any old `char*` pair has no alignment guarantees. 7 comments simonask Reply jstimpfle 5 months ago That's true, and that's why your typical string vector code has a prelude and a postlude to do the incomplete chunks at the ends. Between the ends, it's processing larger self-aligned chunks. simonask 5 months ago If you're aware of that technique, why were you asking about use cases for unaligned loads? jstimpfle 5 months ago I'm saying that string search algorithms are _not_ a legitimate use case for unaligned loads. 4 replies →
jstimpfle 5 months ago That's true, and that's why your typical string vector code has a prelude and a postlude to do the incomplete chunks at the ends. Between the ends, it's processing larger self-aligned chunks. simonask 5 months ago If you're aware of that technique, why were you asking about use cases for unaligned loads? jstimpfle 5 months ago I'm saying that string search algorithms are _not_ a legitimate use case for unaligned loads. 4 replies →
simonask 5 months ago If you're aware of that technique, why were you asking about use cases for unaligned loads? jstimpfle 5 months ago I'm saying that string search algorithms are _not_ a legitimate use case for unaligned loads. 4 replies →
jstimpfle 5 months ago I'm saying that string search algorithms are _not_ a legitimate use case for unaligned loads. 4 replies →
That's true, and that's why your typical string vector code has a prelude and a postlude to do the incomplete chunks at the ends. Between the ends, it's processing larger self-aligned chunks.
If you're aware of that technique, why were you asking about use cases for unaligned loads?
I'm saying that string search algorithms are _not_ a legitimate use case for unaligned loads.
4 replies →