bytestring
bytestring copied to clipboard
An efficient compact, immutable byte string type (both strict and lazy) suitable for binary or 8-bit character data.
I think we just need to create a pinned byte array. This would allow conversion to `Text` without copying when reading from a file
As discussed at #535, `withForeignPtr` will be much slower in at least GHC-9.2.4 and GHC-9.4.1. So I made a quick pass at removing all internal uses of this function. To...
Case conversions can benefit from low-level tricks. While `Data.ByteString.Char8.map Data.Char.toLower` converts byte by byte, one can actually read 8 bytes at once as `Word64` (or even more, when vectorised instructions...
Following the discussion from https://github.com/haskell/bytestring/issues/524#issuecomment-1173126905 Before: ``` $ cabal run -w ghc-9.2.3 --enable-profiling bytestring-bench --ghc-options='-fcheck-prim-bounds -fno-ignore-asserts' -- -p 'unpack' +RTS -s Up to date All ShortByteString ShortByteString unpack unpack and...
Currently we have: ``` {-# INLINE CONLIKE storableToF #-} storableToF :: forall a. Storable a => FixedPrim a -- Not all architectures are forgiving of unaligned accesses; whitelist ones --...
PR attempting to fix #513. As discussed in the issue, I used the `Data.Text` implementation to copy from. I found the PR where the `toConstr` function was [implemented](https://github.com/haskell/text/pull/74), but it...
Fixes #524
In an attempt to improve performance of filepath functions using ShortByteString I figured that `unpack` slowed down a couple of functions. Moving to several calls of uncons seemed to improve...
It would be nice if BS.getLine would use the handle's newline setting so that in `CRLF` mode strings are returned with both the CR (if present) and LF removed. An...