"If you think you know what you are doing, use `unsafePerformIO`. If you are sure you know what you are doing, use `unsafeDupablePerformIO`. If you enjoy sharing an address space with a malevolent agent of chaos, try `accursedUnutterablePerformIO`." https://github.com/haskell/bytestring/blob/2530b1c28f15d0f320a84701bf507d5650de6098/Data/ByteString/Internal.hs#L624-L634 …
-
-
Replying to @hmemcpy @lambdakitten
why... why does that live in Data.ByteString?
2 replies 0 retweets 8 likes
Almost nothing needs manual cursed optimizations of this magnitude. ByteString uses raw (mutable) byte arrays underneath, so this allows you to do ie. slicing or comparisons at C speed while pretending to be an immutable object like everything else in Haskell.
7:48 AM - 24 Mar 2019
0 replies
0 retweets
4 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.