4 ms·
It's basically equivalent to: $ export LC_ALL=C; grep ... The regular grep works on Unicode, which can be 10 times slow. Sift works on plain bytes. Also sif
by snordlast 11y ago
It's basically equivalent to:
$ export LC_ALL=C; grep ...
The regular grep works on Unicode, which can be 10 times slow. Sift works on plain bytes. Also sift benchmark is somewhat inflated. Test on your own data.
- agumonkey 11y agoThere was an article about haskell vs C where, haskell would appear slow at first because its string type was unicode while C was ascii. When using unicode the c code suddenly was a bit slower than haskell's. Details matter.
- hawkice 11y agoTo be perhaps even more fair, Haskell's String type is actually a singly linked list of unicode 32 characters, so you'd want C to use unicode and Haskell to use ByteString (or Text).