Seems like strict ByteString
is structuraly same as Vector Word8
. Why ByteString
is not deprecated in favor of Vector
?
Are there performance examples when ByteString
is faster than Vector Byte8
?
The vector-bytestring
package is an attempt at doing exactly this:
type ByteString = Vector Word8
The goal of the author is to replace bytestring
, but for now there are some performance regressions and it doesn't seem very active.
According to the author, the main reason for the performance regressions are that bytestring
often uses mutation internally. vector-bytestring
might have an advantage in some cases where stream fusion kicks in, but otherwise it may need to fall back to mutation to get comparable performance and it doesn't do that yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With