on master help sign in
Add a couple of useful/TODO comments
8adebe0Harendra Kumar
core/src/Streamly/Internal/Data/MutByteArray/Type.hs+6
@@ -196,6 +196,12 @@ newBytesAs Pinned = pinnedNew
196-- Copying
196-- Copying
197-------------------------------------------------------------------------------
197-------------------------------------------------------------------------------
198
198
199+-- Note: Array copy is more efficient than streaming copy.
200+-- CopyMutableByteArray# translates to genMemcpy in GHC/CmmToAsm/X86/CodeGen.hs
201+-- glibc memcpy copies bytes/words/pages - unrolls the loops:
202+-- https://github.com/bminor/glibc/blob/4290aed05135ae4c0272006442d147f2155e70d7/string/memcpy.c
203+-- https://github.com/bminor/glibc/blob/4290aed05135ae4c0272006442d147f2155e70d7/string/wordcopy.c
204+
199-- | Put a sub range of a source array into a subrange of a destination array.
205-- | Put a sub range of a source array into a subrange of a destination array.
200-- This is not safe as it does not check the bounds of neither the src array
206-- This is not safe as it does not check the bounds of neither the src array
201-- nor the destination array.
207-- nor the destination array.
core/src/Streamly/Internal/Data/Serialize/TH.hs+5−1
@@ -7,7 +7,11 @@
7-- Maintainer : streamly@composewell.com
7-- Maintainer : streamly@composewell.com
8-- Stability : experimental
8-- Stability : experimental
9-- Portability : GHC
9-- Portability : GHC
10−--
10+
11+-- XXX Instead of applying the product constructor in one go can we apply it
12+-- one at a time in case of too many arguments, compiler may not have to save
13+-- them in local vars.
14+
11module Streamly.Internal.Data.Serialize.TH
15module Streamly.Internal.Data.Serialize.TH
12 (
16 (
13 -- Deriving
17 -- Deriving