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
Both strict and lazy bytestrings provide instance Semigroup, but rely on the default definition of Data.Semigroup.stimes. It would be better to provide an optimized definition.
For a strict bytestring, we can immediately allocate all required memory and memcpy in a loop. This is a simple extension of the implementation for (<>):
Both strict and lazy bytestrings provide
instance Semigroup
, but rely on the default definition ofData.Semigroup.stimes
. It would be better to provide an optimized definition.For a strict bytestring, we can immediately allocate all required memory and
memcpy
in a loop. This is a simple extension of the implementation for(<>)
:bytestring/Data/ByteString/Internal.hs
Lines 594 to 598 in 14ebbc5
For lazy bytestrings no low level manipulations needed, one can write something similar to
sconcat
:bytestring/Data/ByteString/Lazy/Internal.hs
Lines 270 to 276 in 14ebbc5
The text was updated successfully, but these errors were encountered: