@@ -172,6 +172,11 @@ shiftAdd conv xs =
172172 map (\(j, x) -> shiftL x (j * 8)) $ zip [0 ..] $ map conv xs
173173
174174-- Note: This only works in little endian machines
175+-- TODO:
176+-- Instead of generating this via TH can't we write it directly in Haskell and
177+-- use that? Creating one comparison function for each deserialization may be
178+-- too much code and may not be necessary.
179+-- Benchmark both the implementations and check.
175180xorCmp :: [Word8] -> Name -> Name -> Q Exp
176181xorCmp tag off arr =
177182 case tagLen of
@@ -253,7 +258,10 @@ xorCmp tag off arr =
253258-- Primitive serialization
254259--------------------------------------------------------------------------------
255260
256−-- XXX Batch serialize? See xorCmp
261+-- TODO:
262+-- Will this be too much of a code bloat?
263+-- Loop with the loop body unrolled?
264+-- Serialize this in batches similar to batch comparision in xorCmp?
257265serializeW8List :: Name -> Name -> [Word8] -> Q Exp
258266serializeW8List off arr w8List = do
259267 [|let $(varP (makeN 0)) = $(varE off)