You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function is about 8x faster than a call to Data.ByteString.all (< 128), because instead of checking one Word8 at a time, it can check eight Word8s at a time, using a cool bit twiddling optimisation. There is a test suite and benchmark suite to confirm that it both works and is that fast.
This discussion was converted from issue #3 on April 19, 2022 01:15.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
https://hackage.haskell.org/package/bytestring-encodings-0.2.0.2/docs/Data-ByteString-Encodings.html#v:isAscii
This function is about 8x faster than a call to
Data.ByteString.all (< 128)
, because instead of checking oneWord8
at a time, it can check eightWord8
s at a time, using a cool bit twiddling optimisation. There is a test suite and benchmark suite to confirm that it both works and is that fast.Beta Was this translation helpful? Give feedback.
All reactions