Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
jstimpfle
1mo ago
0 comments
Save
Share
Where is the part about unaligned pointers?
0 comments
3 comments · 1 top-level
top
newest
oldest
simonask
1mo ago
· 2 in thread
Strings typically consist of UTF-8 bytes, and any old `char*` pair has no alignment guarantees.
jstimpfle
OP
1mo 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
1mo ago
If you're aware of that technique, why were you asking about use cases for unaligned loads?
1 more reply
j
/
k
navigate · click thread line to collapse