public
Last active

  • Download Gist
BuilderImports.hs
Haskell
1 2 3 4 5 6 7 8 9 10 11 12
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
 
import Blaze.ByteString.Builder
import Blaze.ByteString.Builder.Char.Utf8 (fromString)
 
import Data.Monoid
 
infixl 4 <>
 
(<>) :: Monoid a => a -> a -> a
(<>) = mappend
ComparisonToBinaryPackage.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
./benchmarks/BenchThroughput 100
 
Binary serialisation benchmarks:
 
 
benchmarking serialization speed:
BlazeBuilder: 100MB of Word8 in chunks of 1 ( Host endian): 26.6 MB/s write
BlazeBuilder: 100MB of Word8 in chunks of 2 ( Host endian): 55.7 MB/s write
BlazeBuilder: 100MB of Word8 in chunks of 4 ( Host endian): 92.9 MB/s write
BlazeBuilder: 100MB of Word8 in chunks of 8 ( Host endian): 152.4 MB/s write
BlazeBuilder: 100MB of Word8 in chunks of 16 ( Host endian): 219.3 MB/s write
BlazeBuilderDecl: 100MB of Word8 in chunks of 1 ( Host endian): 64.1 MB/s write
BlazeBuilderDecl: 100MB of Word8 in chunks of 2 ( Host endian): 67.6 MB/s write
BlazeBuilderDecl: 100MB of Word8 in chunks of 4 ( Host endian): 66.3 MB/s write
BlazeBuilderDecl: 100MB of Word8 in chunks of 8 ( Host endian): 70.4 MB/s write
BlazeBuilderDecl: 100MB of Word8 in chunks of 16 ( Host endian): 53.1 MB/s write
BlazePut: 100MB of Word8 in chunks of 1 ( Host endian): 13.0 MB/s write
BlazePut: 100MB of Word8 in chunks of 2 ( Host endian): 24.1 MB/s write
BlazePut: 100MB of Word8 in chunks of 4 ( Host endian): 42.9 MB/s write
BlazePut: 100MB of Word8 in chunks of 8 ( Host endian): 78.6 MB/s write
BlazePut: 100MB of Word8 in chunks of 16 ( Host endian): 121.9 MB/s write
BinaryBuilder: 100MB of Word8 in chunks of 1 ( Host endian): 27.3 MB/s write
BinaryBuilder: 100MB of Word8 in chunks of 2 ( Host endian): 42.4 MB/s write
BinaryBuilder: 100MB of Word8 in chunks of 4 ( Host endian): 60.1 MB/s write
BinaryBuilder: 100MB of Word8 in chunks of 8 ( Host endian): 78.1 MB/s write
BinaryBuilder: 100MB of Word8 in chunks of 16 ( Host endian): 91.2 MB/s write
BinaryBuilderDecl: 100MB of Word8 in chunks of 1 ( Host endian): 2.0 MB/s write
BinaryPut: 100MB of Word8 in chunks of 1 ( Host endian): 24.6 MB/s write
BinaryPut: 100MB of Word8 in chunks of 2 ( Host endian): 37.7 MB/s write
BinaryPut: 100MB of Word8 in chunks of 4 ( Host endian): 55.7 MB/s write
BinaryPut: 100MB of Word8 in chunks of 8 ( Host endian): 71.8 MB/s write
BinaryPut: 100MB of Word8 in chunks of 16 ( Host endian): 87.4 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 1 ( Host endian): 56.8 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 2 ( Host endian): 100.4 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 4 ( Host endian): 183.8 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 8 ( Host endian): 294.1 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 16 ( Host endian): 431.0 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 1 ( Host endian): 130.9 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 2 ( Host endian): 131.6 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 4 ( Host endian): 135.1 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 8 ( Host endian): 119.6 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 16 ( Host endian): 124.4 MB/s write
BlazePut: 100MB of Word16 in chunks of 1 ( Host endian): 43.3 MB/s write
BlazePut: 100MB of Word16 in chunks of 2 ( Host endian): 45.8 MB/s write
BlazePut: 100MB of Word16 in chunks of 4 ( Host endian): 74.2 MB/s write
BlazePut: 100MB of Word16 in chunks of 8 ( Host endian): 156.2 MB/s write
BlazePut: 100MB of Word16 in chunks of 16 ( Host endian): 257.7 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 1 ( Host endian): 50.6 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 2 ( Host endian): 69.6 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 4 ( Host endian): 95.4 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 8 ( Host endian): 112.1 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 16 ( Host endian): 130.9 MB/s write
BinaryBuilderDecl: 100MB of Word16 in chunks of 1 ( Host endian): 3.4 MB/s write
BinaryPut: 100MB of Word16 in chunks of 1 ( Host endian): 45.1 MB/s write
BinaryPut: 100MB of Word16 in chunks of 2 ( Host endian): 61.0 MB/s write
BinaryPut: 100MB of Word16 in chunks of 4 ( Host endian): 85.9 MB/s write
BinaryPut: 100MB of Word16 in chunks of 8 ( Host endian): 105.5 MB/s write
BinaryPut: 100MB of Word16 in chunks of 16 ( Host endian): 122.5 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 1 ( Big endian): 48.2 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 2 ( Big endian): 80.9 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 4 ( Big endian): 172.4 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 8 ( Big endian): 260.4 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 16 ( Big endian): 357.1 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 1 ( Big endian): 112.1 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 2 ( Big endian): 113.6 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 4 ( Big endian): 113.6 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 8 ( Big endian): 118.5 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 16 ( Big endian): 104.6 MB/s write
BlazePut: 100MB of Word16 in chunks of 1 ( Big endian): 42.4 MB/s write
BlazePut: 100MB of Word16 in chunks of 2 ( Big endian): 42.0 MB/s write
BlazePut: 100MB of Word16 in chunks of 4 ( Big endian): 67.2 MB/s write
BlazePut: 100MB of Word16 in chunks of 8 ( Big endian): 145.3 MB/s write
BlazePut: 100MB of Word16 in chunks of 16 ( Big endian): 198.4 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 1 ( Big endian): 44.2 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 2 ( Big endian): 67.4 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 4 ( Big endian): 87.1 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 8 ( Big endian): 107.8 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 16 ( Big endian): 117.9 MB/s write
BinaryBuilderDecl: 100MB of Word16 in chunks of 1 ( Big endian): 3.7 MB/s write
BinaryPut: 100MB of Word16 in chunks of 1 ( Big endian): 41.1 MB/s write
BinaryPut: 100MB of Word16 in chunks of 2 ( Big endian): 61.0 MB/s write
BinaryPut: 100MB of Word16 in chunks of 4 ( Big endian): 82.5 MB/s write
BinaryPut: 100MB of Word16 in chunks of 8 ( Big endian): 105.0 MB/s write
BinaryPut: 100MB of Word16 in chunks of 16 ( Big endian): 118.5 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 1 (Little endian): 50.7 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 2 (Little endian): 83.6 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 4 (Little endian): 174.8 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 8 (Little endian): 268.8 MB/s write
BlazeBuilder: 100MB of Word16 in chunks of 16 (Little endian): 384.6 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 1 (Little endian): 117.9 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 2 (Little endian): 117.9 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 4 (Little endian): 95.4 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 8 (Little endian): 118.5 MB/s write
BlazeBuilderDecl: 100MB of Word16 in chunks of 16 (Little endian): 104.2 MB/s write
BlazePut: 100MB of Word16 in chunks of 1 (Little endian): 43.5 MB/s write
BlazePut: 100MB of Word16 in chunks of 2 (Little endian): 44.3 MB/s write
BlazePut: 100MB of Word16 in chunks of 4 (Little endian): 69.8 MB/s write
BlazePut: 100MB of Word16 in chunks of 8 (Little endian): 152.4 MB/s write
BlazePut: 100MB of Word16 in chunks of 16 (Little endian): 223.2 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 1 (Little endian): 45.2 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 2 (Little endian): 67.0 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 4 (Little endian): 91.6 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 8 (Little endian): 109.6 MB/s write
BinaryBuilder: 100MB of Word16 in chunks of 16 (Little endian): 121.9 MB/s write
BinaryBuilderDecl: 100MB of Word16 in chunks of 1 (Little endian): 4.0 MB/s write
BinaryPut: 100MB of Word16 in chunks of 1 (Little endian): 39.9 MB/s write
BinaryPut: 100MB of Word16 in chunks of 2 (Little endian): 61.0 MB/s write
BinaryPut: 100MB of Word16 in chunks of 4 (Little endian): 85.0 MB/s write
BinaryPut: 100MB of Word16 in chunks of 8 (Little endian): 104.6 MB/s write
BinaryPut: 100MB of Word16 in chunks of 16 (Little endian): 112.1 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 1 ( Host endian): 89.0 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 2 ( Host endian): 221.2 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 4 ( Host endian): 333.3 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 8 ( Host endian): 581.4 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 16 ( Host endian): 862.0 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 1 ( Host endian): 104.2 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 2 ( Host endian): 88.3 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 4 ( Host endian): 86.2 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 8 ( Host endian): 89.9 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 16 ( Host endian): 85.9 MB/s write
BlazePut: 100MB of Word32 in chunks of 1 ( Host endian): 75.3 MB/s write
BlazePut: 100MB of Word32 in chunks of 2 ( Host endian): 79.4 MB/s write
BlazePut: 100MB of Word32 in chunks of 4 ( Host endian): 173.6 MB/s write
BlazePut: 100MB of Word32 in chunks of 8 ( Host endian): 320.5 MB/s write
BlazePut: 100MB of Word32 in chunks of 16 ( Host endian): 446.4 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 1 ( Host endian): 88.0 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 2 ( Host endian): 126.9 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 4 ( Host endian): 242.7 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 8 ( Host endian): 316.4 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 16 ( Host endian): 367.6 MB/s write
BinaryBuilderDecl: 100MB of Word32 in chunks of 1 ( Host endian): 8.3 MB/s write
BinaryPut: 100MB of Word32 in chunks of 1 ( Host endian): 80.4 MB/s write
BinaryPut: 100MB of Word32 in chunks of 2 ( Host endian): 108.2 MB/s write
BinaryPut: 100MB of Word32 in chunks of 4 ( Host endian): 217.4 MB/s write
BinaryPut: 100MB of Word32 in chunks of 8 ( Host endian): 297.6 MB/s write
BinaryPut: 100MB of Word32 in chunks of 16 ( Host endian): 347.2 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 1 ( Big endian): 84.5 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 2 ( Big endian): 185.2 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 4 ( Big endian): 304.9 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 8 ( Big endian): 446.4 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 16 ( Big endian): 595.2 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 1 ( Big endian): 98.8 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 2 ( Big endian): 78.1 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 4 ( Big endian): 82.0 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 8 ( Big endian): 78.9 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 16 ( Big endian): 80.6 MB/s write
BlazePut: 100MB of Word32 in chunks of 1 ( Big endian): 71.8 MB/s write
BlazePut: 100MB of Word32 in chunks of 2 ( Big endian): 76.7 MB/s write
BlazePut: 100MB of Word32 in chunks of 4 ( Big endian): 160.2 MB/s write
BlazePut: 100MB of Word32 in chunks of 8 ( Big endian): 268.8 MB/s write
BlazePut: 100MB of Word32 in chunks of 16 ( Big endian): 416.6 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 1 ( Big endian): 79.4 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 2 ( Big endian): 109.6 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 4 ( Big endian): 215.5 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 8 ( Big endian): 255.1 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 16 ( Big endian): 287.3 MB/s write
BinaryBuilderDecl: 100MB of Word32 in chunks of 1 ( Big endian): 4.8 MB/s write
BinaryPut: 100MB of Word32 in chunks of 1 ( Big endian): 71.2 MB/s write
BinaryPut: 100MB of Word32 in chunks of 2 ( Big endian): 102.5 MB/s write
BinaryPut: 100MB of Word32 in chunks of 4 ( Big endian): 192.3 MB/s write
BinaryPut: 100MB of Word32 in chunks of 8 ( Big endian): 245.1 MB/s write
BinaryPut: 100MB of Word32 in chunks of 16 ( Big endian): 274.7 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 1 (Little endian): 84.2 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 2 (Little endian): 189.4 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 4 (Little endian): 294.1 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 8 (Little endian): 446.4 MB/s write
BlazeBuilder: 100MB of Word32 in chunks of 16 (Little endian): 595.2 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 1 (Little endian): 96.1 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 2 (Little endian): 81.2 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 4 (Little endian): 80.4 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 8 (Little endian): 80.4 MB/s write
BlazeBuilderDecl: 100MB of Word32 in chunks of 16 (Little endian): 72.0 MB/s write
BlazePut: 100MB of Word32 in chunks of 1 (Little endian): 74.4 MB/s write
BlazePut: 100MB of Word32 in chunks of 2 (Little endian): 76.4 MB/s write
BlazePut: 100MB of Word32 in chunks of 4 (Little endian): 164.5 MB/s write
BlazePut: 100MB of Word32 in chunks of 8 (Little endian): 263.1 MB/s write
BlazePut: 100MB of Word32 in chunks of 16 (Little endian): 416.6 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 1 (Little endian): 78.9 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 2 (Little endian): 110.6 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 4 (Little endian): 219.3 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 8 (Little endian): 265.9 MB/s write
BinaryBuilder: 100MB of Word32 in chunks of 16 (Little endian): 287.3 MB/s write
BinaryBuilderDecl: 100MB of Word32 in chunks of 1 (Little endian): 6.8 MB/s write
BinaryPut: 100MB of Word32 in chunks of 1 (Little endian): 61.1 MB/s write
BinaryPut: 100MB of Word32 in chunks of 2 (Little endian): 102.9 MB/s write
BinaryPut: 100MB of Word32 in chunks of 4 (Little endian): 196.8 MB/s write
BinaryPut: 100MB of Word32 in chunks of 8 (Little endian): 240.4 MB/s write
BinaryPut: 100MB of Word32 in chunks of 16 (Little endian): 271.7 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 1 ( Host endian): 75.3 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 2 ( Host endian): 135.1 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 4 ( Host endian): 160.2 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 8 ( Host endian): 200.0 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 16 ( Host endian): 195.3 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 1 ( Host endian): 173.6 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 2 ( Host endian): 143.7 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 4 ( Host endian): 145.3 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 8 ( Host endian): 147.9 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 16 ( Host endian): 145.3 MB/s write
BlazePut: 100MB of Word64 in chunks of 1 ( Host endian): 72.7 MB/s write
BlazePut: 100MB of Word64 in chunks of 2 ( Host endian): 76.4 MB/s write
BlazePut: 100MB of Word64 in chunks of 4 ( Host endian): 140.4 MB/s write
BlazePut: 100MB of Word64 in chunks of 8 ( Host endian): 181.1 MB/s write
BlazePut: 100MB of Word64 in chunks of 16 ( Host endian): 192.3 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 1 ( Host endian): 70.4 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 2 ( Host endian): 121.4 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 4 ( Host endian): 152.4 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 8 ( Host endian): 163.4 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 16 ( Host endian): 174.8 MB/s write
BinaryBuilderDecl: 100MB of Word64 in chunks of 1 ( Host endian): 15.9 MB/s write
BinaryPut: 100MB of Word64 in chunks of 1 ( Host endian): 68.5 MB/s write
BinaryPut: 100MB of Word64 in chunks of 2 ( Host endian): 115.2 MB/s write
BinaryPut: 100MB of Word64 in chunks of 4 ( Host endian): 134.4 MB/s write
BinaryPut: 100MB of Word64 in chunks of 8 ( Host endian): 170.1 MB/s write
BinaryPut: 100MB of Word64 in chunks of 16 ( Host endian): 182.5 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 1 ( Big endian): 54.3 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 2 ( Big endian): 66.7 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 4 ( Big endian): 96.5 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 8 ( Big endian): 90.2 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 16 ( Big endian): 94.7 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 1 ( Big endian): 119.0 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 2 ( Big endian): 107.3 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 4 ( Big endian): 107.3 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 8 ( Big endian): 109.6 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 16 ( Big endian): 108.7 MB/s write
BlazePut: 100MB of Word64 in chunks of 1 ( Big endian): 61.4 MB/s write
BlazePut: 100MB of Word64 in chunks of 2 ( Big endian): 55.1 MB/s write
BlazePut: 100MB of Word64 in chunks of 4 ( Big endian): 73.7 MB/s write
BlazePut: 100MB of Word64 in chunks of 8 ( Big endian): 89.6 MB/s write
BlazePut: 100MB of Word64 in chunks of 16 ( Big endian): 83.9 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 1 ( Big endian): 52.1 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 2 ( Big endian): 67.7 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 4 ( Big endian): 67.4 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 8 ( Big endian): 91.9 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 16 ( Big endian): 82.2 MB/s write
BinaryBuilderDecl: 100MB of Word64 in chunks of 1 ( Big endian): 5.8 MB/s write
BinaryPut: 100MB of Word64 in chunks of 1 ( Big endian): 52.0 MB/s write
BinaryPut: 100MB of Word64 in chunks of 2 ( Big endian): 63.0 MB/s write
BinaryPut: 100MB of Word64 in chunks of 4 ( Big endian): 67.7 MB/s write
BinaryPut: 100MB of Word64 in chunks of 8 ( Big endian): 87.1 MB/s write
BinaryPut: 100MB of Word64 in chunks of 16 ( Big endian): 84.2 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 1 (Little endian): 56.7 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 2 (Little endian): 69.4 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 4 (Little endian): 98.0 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 8 (Little endian): 96.9 MB/s write
BlazeBuilder: 100MB of Word64 in chunks of 16 (Little endian): 91.2 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 1 (Little endian): 121.4 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 2 (Little endian): 107.8 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 4 (Little endian): 106.8 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 8 (Little endian): 103.3 MB/s write
BlazeBuilderDecl: 100MB of Word64 in chunks of 16 (Little endian): 101.2 MB/s write
BlazePut: 100MB of Word64 in chunks of 1 (Little endian): 63.0 MB/s write
BlazePut: 100MB of Word64 in chunks of 2 (Little endian): 58.3 MB/s write
BlazePut: 100MB of Word64 in chunks of 4 (Little endian): 77.2 MB/s write
BlazePut: 100MB of Word64 in chunks of 8 (Little endian): 78.4 MB/s write
BlazePut: 100MB of Word64 in chunks of 16 (Little endian): 82.0 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 1 (Little endian): 53.5 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 2 (Little endian): 64.4 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 4 (Little endian): 74.4 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 8 (Little endian): 83.1 MB/s write
BinaryBuilder: 100MB of Word64 in chunks of 16 (Little endian): 87.4 MB/s write
BinaryBuilderDecl: 100MB of Word64 in chunks of 1 (Little endian): 6.2 MB/s write
BinaryPut: 100MB of Word64 in chunks of 1 (Little endian): 52.5 MB/s write
BinaryPut: 100MB of Word64 in chunks of 2 (Little endian): 61.6 MB/s write
BinaryPut: 100MB of Word64 in chunks of 4 (Little endian): 69.2 MB/s write
BinaryPut: 100MB of Word64 in chunks of 8 (Little endian): 84.5 MB/s write
BinaryPut: 100MB of Word64 in chunks of 16 (Little endian): 82.0 MB/s write
ExampleChunkSizes.hs
Haskell
1 2
(map S.length $ L.toChunks lazyBinaryCloneVillage)
= [4088,32760,32760,32760,32760,32760,2113]
PackingShortWord8Lists_results.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
ranking for 1 bytes
1. S.pack: mean 42.83119 ns (2p 42.13774 ns, 98p 44.77660 ns, out 7)
2. packLazy: mean 93.05726 ns (2p 92.31779 ns, 98p 97.53600 ns, out 14)
3. packStrict: mean 147.0252 ns (2p 146.1263 ns, 98p 151.3155 ns, out 10)
 
running benchmarks for 2 bytes
collecting 100 samples, 335042 iterations each, in estimated 1.680053 s
collecting 100 samples, 169157 iterations each, in estimated 1.680060 s
collecting 100 samples, 106284 iterations each, in estimated 1.680052 s
 
ranking for 2 bytes
1. S.pack: mean 50.21580 ns (2p 49.39873 ns, 98p 54.21264 ns, out 13)
2. packLazy: mean 99.35612 ns (2p 98.79761 ns, 98p 101.2487 ns, out 7)
3. packStrict: mean 155.5226 ns (2p 154.5146 ns, 98p 161.0478 ns, out 7)
 
running benchmarks for 3 bytes
collecting 100 samples, 296008 iterations each, in estimated 1.680053 s
collecting 100 samples, 161178 iterations each, in estimated 1.680059 s
collecting 100 samples, 108046 iterations each, in estimated 1.680056 s
 
ranking for 3 bytes
1. S.pack: mean 56.54769 ns (2p 56.28029 ns, 98p 57.92313 ns, out 6)
2. packLazy: mean 102.5641 ns (2p 101.7835 ns, 98p 106.4535 ns, out 8)
3. packStrict: mean 155.7917 ns (2p 154.9004 ns, 98p 161.3357 ns, out 10)
 
running benchmarks for 4 bytes
collecting 100 samples, 258793 iterations each, in estimated 1.680054 s
collecting 100 samples, 162331 iterations each, in estimated 1.680060 s
collecting 100 samples, 106767 iterations each, in estimated 1.680055 s
 
ranking for 4 bytes
1. S.pack: mean 63.65278 ns (2p 63.31474 ns, 98p 65.84488 ns, out 9)
2. packLazy: mean 101.2619 ns (2p 100.6297 ns, 98p 105.3046 ns, out 8)
3. packStrict: mean 155.9066 ns (2p 154.9293 ns, 98p 162.5038 ns, out 12)
 
running benchmarks for 5 bytes
collecting 100 samples, 233890 iterations each, in estimated 1.680055 s
collecting 100 samples, 152684 iterations each, in estimated 1.680062 s
collecting 100 samples, 104245 iterations each, in estimated 1.680057 s
 
ranking for 5 bytes
1. S.pack: mean 73.58180 ns (2p 73.15512 ns, 98p 75.91955 ns, out 8)
2. packLazy: mean 107.8367 ns (2p 107.0415 ns, 98p 111.7507 ns, out 11)
3. packStrict: mean 161.4781 ns (2p 160.7403 ns, 98p 165.9176 ns, out 10)
 
running benchmarks for 6 bytes
collecting 100 samples, 203678 iterations each, in estimated 1.680052 s
collecting 100 samples, 142947 iterations each, in estimated 1.680061 s
collecting 100 samples, 97346 iterations each, in estimated 1.680053 s
 
ranking for 6 bytes
1. S.pack: mean 84.58357 ns (2p 84.11655 ns, 98p 86.25145 ns, out 11)
2. packLazy: mean 116.6856 ns (2p 116.1789 ns, 98p 118.8127 ns, out 6)
3. packStrict: mean 170.3627 ns (2p 168.3203 ns, 98p 174.0810 ns, out 3)
 
running benchmarks for 7 bytes
collecting 100 samples, 182330 iterations each, in estimated 1.680055 s
collecting 100 samples, 135024 iterations each, in estimated 1.680064 s
collecting 100 samples, 93076 iterations each, in estimated 1.680057 s
 
ranking for 7 bytes
1. S.pack: mean 90.29232 ns (2p 89.79921 ns, 98p 91.41156 ns, out 8)
2. packLazy: mean 123.7016 ns (2p 123.2550 ns, 98p 125.5327 ns, out 8)
3. packStrict: mean 176.0041 ns (2p 173.6487 ns, 98p 194.6387 ns, out 5)
 
running benchmarks for 8 bytes
collecting 100 samples, 164059 iterations each, in estimated 1.680054 s
collecting 100 samples, 147366 iterations each, in estimated 1.680062 s
collecting 100 samples, 99355 iterations each, in estimated 1.680062 s
 
ranking for 8 bytes
1. S.pack: mean 94.15258 ns (2p 93.55444 ns, 98p 96.96248 ns, out 10)
2. packLazy: mean 115.9565 ns (2p 115.2546 ns, 98p 119.9706 ns, out 8)
3. packStrict: mean 167.8485 ns (2p 166.8312 ns, 98p 171.6430 ns, out 9)
 
running benchmarks for 9 bytes
collecting 100 samples, 160297 iterations each, in estimated 1.680061 s
collecting 100 samples, 139686 iterations each, in estimated 1.680064 s
collecting 100 samples, 95593 iterations each, in estimated 1.680054 s
 
ranking for 9 bytes
1. S.pack: mean 107.6383 ns (2p 107.0352 ns, 98p 110.2462 ns, out 7)
2. packLazy: mean 122.1066 ns (2p 121.4324 ns, 98p 123.8962 ns, out 7)
3. packStrict: mean 173.8622 ns (2p 172.9147 ns, 98p 176.4201 ns, out 5)
 
running benchmarks for 10 bytes
collecting 100 samples, 145122 iterations each, in estimated 1.680058 s
collecting 100 samples, 132445 iterations each, in estimated 1.680064 s
collecting 100 samples, 93254 iterations each, in estimated 1.680064 s
 
ranking for 10 bytes
1. S.pack: mean 115.7126 ns (2p 115.1486 ns, 98p 117.6738 ns, out 8)
2. packLazy: mean 123.5339 ns (2p 122.8997 ns, 98p 125.5852 ns, out 8)
3. packStrict: mean 178.4621 ns (2p 176.4257 ns, 98p 182.6013 ns, out 1)
 
running benchmarks for 11 bytes
collecting 100 samples, 139993 iterations each, in estimated 1.680064 s
collecting 100 samples, 126382 iterations each, in estimated 1.680064 s
collecting 100 samples, 90169 iterations each, in estimated 1.680070 s
 
ranking for 11 bytes
1. S.pack: mean 122.3987 ns (2p 121.7023 ns, 98p 124.5404 ns, out 12)
2. packLazy: mean 129.6210 ns (2p 128.8599 ns, 98p 131.0011 ns, out 6)
3. packStrict: mean 182.6191 ns (2p 180.7754 ns, 98p 185.9308 ns, out 2)
 
running benchmarks for 12 bytes
collecting 100 samples, 130518 iterations each, in estimated 1.680062 s
collecting 100 samples, 129846 iterations each, in estimated 1.680056 s
collecting 100 samples, 90573 iterations each, in estimated 1.680068 s
 
ranking for 12 bytes
1. S.pack: mean 123.5202 ns (2p 122.8528 ns, 98p 126.7766 ns, out 7)
2. packLazy: mean 133.0994 ns (2p 132.3510 ns, 98p 137.1125 ns, out 7)
3. packStrict: mean 183.5245 ns (2p 182.3568 ns, 98p 190.9750 ns, out 11)
 
running benchmarks for 13 bytes
collecting 100 samples, 122618 iterations each, in estimated 1.680055 s
collecting 100 samples, 119129 iterations each, in estimated 1.680053 s
collecting 100 samples, 86063 iterations each, in estimated 1.680070 s
 
ranking for 13 bytes
1. packLazy: mean 138.4148 ns (2p 137.7025 ns, 98p 143.0880 ns, out 8)
2. S.pack: mean 139.1743 ns (2p 138.4580 ns, 98p 142.5692 ns, out 7)
3. packStrict: mean 190.0098 ns (2p 187.5195 ns, 98p 193.9595 ns, out 1)
 
running benchmarks for 14 bytes
collecting 100 samples, 113869 iterations each, in estimated 1.680065 s
collecting 100 samples, 115046 iterations each, in estimated 1.680062 s
collecting 100 samples, 84169 iterations each, in estimated 1.680070 s
 
ranking for 14 bytes
1. S.pack: mean 139.5388 ns (2p 138.8206 ns, 98p 141.7573 ns, out 10)
2. packLazy: mean 144.0156 ns (2p 143.2330 ns, 98p 149.5459 ns, out 8)
3. packStrict: mean 192.9668 ns (2p 191.3473 ns, 98p 196.4464 ns, out 8)
 
running benchmarks for 16 bytes
collecting 100 samples, 106442 iterations each, in estimated 1.680052 s
collecting 100 samples, 116902 iterations each, in estimated 1.680054 s
collecting 100 samples, 86906 iterations each, in estimated 1.680070 s
 
ranking for 16 bytes
1. packLazy: mean 139.7280 ns (2p 138.2901 ns, 98p 148.3096 ns, out 18)
2. S.pack: mean 178.0818 ns (2p 151.8990 ns, 98p 419.3601 ns, out 19)
3. packStrict: mean 191.6962 ns (2p 188.1056 ns, 98p 200.1407 ns, out 5)
 
running benchmarks for 17 bytes
collecting 100 samples, 97585 iterations each, in estimated 1.680060 s
collecting 100 samples, 110908 iterations each, in estimated 1.680054 s
collecting 100 samples, 82204 iterations each, in estimated 1.680054 s
 
ranking for 17 bytes
1. packLazy: mean 149.1868 ns (2p 147.7217 ns, 98p 152.3070 ns, out 18)
2. S.pack: mean 163.0766 ns (2p 161.6992 ns, 98p 165.7629 ns, out 5)
3. packStrict: mean 204.1729 ns (2p 200.6408 ns, 98p 206.6564 ns, out 1)
 
running benchmarks for 19 bytes
collecting 100 samples, 94170 iterations each, in estimated 1.680054 s
collecting 100 samples, 97606 iterations each, in estimated 1.680066 s
collecting 100 samples, 70777 iterations each, in estimated 1.680065 s
 
ranking for 19 bytes
1. packLazy: mean 165.6105 ns (2p 158.4479 ns, 98p 179.9089 ns, out 0)
2. S.pack: mean 186.9731 ns (2p 185.2138 ns, 98p 193.1766 ns, out 9)
3. packStrict: mean 217.8315 ns (2p 215.1696 ns, 98p 226.3629 ns, out 6)
 
running benchmarks for 21 bytes
collecting 100 samples, 83473 iterations each, in estimated 1.680071 s
collecting 100 samples, 97688 iterations each, in estimated 1.680056 s
collecting 100 samples, 73607 iterations each, in estimated 1.680070 s
 
ranking for 21 bytes
1. packLazy: mean 172.8026 ns (2p 164.5916 ns, 98p 187.6532 ns, out 1)
2. S.pack: mean 191.0365 ns (2p 189.1439 ns, 98p 197.3718 ns, out 7)
3. packStrict: mean 226.8635 ns (2p 220.0805 ns, 98p 241.2025 ns, out 0)
 
running benchmarks for 23 bytes
collecting 100 samples, 77416 iterations each, in estimated 1.680068 s
collecting 100 samples, 89381 iterations each, in estimated 1.680052 s
collecting 100 samples, 68597 iterations each, in estimated 1.680063 s
 
ranking for 23 bytes
1. packLazy: mean 185.3733 ns (2p 181.9654 ns, 98p 196.7158 ns, out 19)
2. S.pack: mean 209.9421 ns (2p 207.8026 ns, 98p 213.7191 ns, out 20)
3. packStrict: mean 245.2394 ns (2p 239.5360 ns, 98p 260.3768 ns, out 9)
 
running benchmarks for 26 bytes
collecting 100 samples, 73400 iterations each, in estimated 1.680058 s
collecting 100 samples, 91548 iterations each, in estimated 1.680052 s
collecting 100 samples, 68569 iterations each, in estimated 1.680063 s
 
ranking for 26 bytes
1. packLazy: mean 182.3401 ns (2p 180.3678 ns, 98p 188.5672 ns, out 13)
2. S.pack: mean 231.6796 ns (2p 229.6457 ns, 98p 238.8098 ns, out 15)
3. packStrict: mean 237.3912 ns (2p 234.7485 ns, 98p 244.7346 ns, out 7)
 
running benchmarks for 28 bytes
collecting 100 samples, 69600 iterations each, in estimated 1.680055 s
collecting 100 samples, 85798 iterations each, in estimated 1.680062 s
collecting 100 samples, 67753 iterations each, in estimated 1.680072 s
 
ranking for 28 bytes
1. packLazy: mean 190.5775 ns (2p 188.6925 ns, 98p 193.7044 ns, out 24)
2. packStrict: mean 244.2672 ns (2p 240.6308 ns, 98p 249.4204 ns, out 2)
3. S.pack: mean 245.1052 ns (2p 242.6473 ns, 98p 249.5680 ns, out 18)
 
running benchmarks for 31 bytes
collecting 100 samples, 61989 iterations each, in estimated 1.680062 s
collecting 100 samples, 77676 iterations each, in estimated 1.680073 s
collecting 100 samples, 61292 iterations each, in estimated 1.680058 s
 
ranking for 31 bytes
1. packLazy: mean 212.3724 ns (2p 211.3316 ns, 98p 219.2249 ns, out 8)
2. S.pack: mean 265.5734 ns (2p 262.5389 ns, 98p 274.0664 ns, out 6)
3. packStrict: mean 270.6576 ns (2p 269.2757 ns, 98p 280.3340 ns, out 8)
 
running benchmarks for 34 bytes
collecting 100 samples, 57692 iterations each, in estimated 1.680066 s
collecting 100 samples, 79090 iterations each, in estimated 1.680071 s
collecting 100 samples, 61220 iterations each, in estimated 1.680066 s
 
ranking for 34 bytes
1. packLazy: mean 209.0598 ns (2p 208.0731 ns, 98p 212.2824 ns, out 6)
2. packStrict: mean 270.2599 ns (2p 269.1007 ns, 98p 276.5331 ns, out 8)
3. S.pack: mean 287.7143 ns (2p 286.3749 ns, 98p 291.7815 ns, out 9)
 
running benchmarks for 37 bytes
collecting 100 samples, 52170 iterations each, in estimated 1.680070 s
collecting 100 samples, 74285 iterations each, in estimated 1.680073 s
collecting 100 samples, 57550 iterations each, in estimated 1.680076 s
 
ranking for 37 bytes
1. packLazy: mean 224.5623 ns (2p 223.3850 ns, 98p 228.4010 ns, out 9)
2. packStrict: mean 282.8023 ns (2p 281.6929 ns, 98p 286.4306 ns, out 9)
3. S.pack: mean 309.2540 ns (2p 307.7332 ns, 98p 316.3649 ns, out 7)
 
running benchmarks for 41 bytes
collecting 100 samples, 48918 iterations each, in estimated 1.680074 s
collecting 100 samples, 70750 iterations each, in estimated 1.680055 s
collecting 100 samples, 55555 iterations each, in estimated 1.680062 s
 
ranking for 41 bytes
1. packLazy: mean 233.3580 ns (2p 232.0340 ns, 98p 241.7505 ns, out 8)
2. packStrict: mean 296.3363 ns (2p 295.0308 ns, 98p 301.3192 ns, out 7)
3. S.pack: mean 342.0402 ns (2p 340.1925 ns, 98p 346.7932 ns, out 8)
 
running benchmarks for 45 bytes
collecting 100 samples, 45365 iterations each, in estimated 1.680076 s
collecting 100 samples, 64749 iterations each, in estimated 1.680076 s
collecting 100 samples, 51763 iterations each, in estimated 1.680069 s
 
ranking for 45 bytes
1. packLazy: mean 260.1073 ns (2p 258.9472 ns, 98p 265.5578 ns, out 9)
2. packStrict: mean 316.4901 ns (2p 313.9594 ns, 98p 325.2418 ns, out 6)
3. S.pack: mean 375.8037 ns (2p 373.5161 ns, 98p 388.8932 ns, out 8)
 
running benchmarks for 50 bytes
collecting 100 samples, 41642 iterations each, in estimated 1.680069 s
collecting 100 samples, 61591 iterations each, in estimated 1.680075 s
collecting 100 samples, 50817 iterations each, in estimated 1.680072 s
 
ranking for 50 bytes
1. packLazy: mean 268.5946 ns (2p 266.9610 ns, 98p 284.5774 ns, out 12)
2. packStrict: mean 328.3566 ns (2p 326.7662 ns, 98p 338.0358 ns, out 8)
3. S.pack: mean 401.7394 ns (2p 399.6968 ns, 98p 414.9206 ns, out 11)
 
running benchmarks for 55 bytes
collecting 100 samples, 38311 iterations each, in estimated 1.680077 s
collecting 100 samples, 55488 iterations each, in estimated 1.680055 s
collecting 100 samples, 45955 iterations each, in estimated 1.680059 s
 
ranking for 55 bytes
1. packLazy: mean 297.3968 ns (2p 296.1426 ns, 98p 301.2465 ns, out 7)
2. packStrict: mean 360.2330 ns (2p 358.5098 ns, 98p 368.0490 ns, out 10)
3. S.pack: mean 434.4996 ns (2p 432.3927 ns, 98p 444.8123 ns, out 10)
 
running benchmarks for 60 bytes
collecting 100 samples, 34695 iterations each, in estimated 1.680060 s
collecting 100 samples, 54031 iterations each, in estimated 1.680069 s
collecting 100 samples, 46476 iterations each, in estimated 1.680084 s
 
ranking for 60 bytes
1. packLazy: mean 304.1365 ns (2p 302.6332 ns, 98p 309.3340 ns, out 9)
2. packStrict: mean 363.1530 ns (2p 361.1853 ns, 98p 371.7831 ns, out 8)
3. S.pack: mean 479.3999 ns (2p 476.8514 ns, 98p 494.2801 ns, out 9)
 
running benchmarks for 66 bytes
collecting 100 samples, 30219 iterations each, in estimated 1.680087 s
collecting 100 samples, 29330 iterations each, in estimated 1.680064 s
collecting 100 samples, 25978 iterations each, in estimated 1.680058 s
 
ranking for 66 bytes
1. S.pack: mean 553.6066 ns (2p 545.8850 ns, 98p 593.4791 ns, out 5)
2. packLazy: mean 564.0610 ns (2p 556.6419 ns, 98p 602.5859 ns, out 6)
3. packStrict: mean 639.5373 ns (2p 635.8514 ns, 98p 663.1529 ns, out 8)
 
running benchmarks for 73 bytes
collecting 100 samples, 27947 iterations each, in estimated 1.680066 s
collecting 100 samples, 27986 iterations each, in estimated 1.680109 s
collecting 100 samples, 24478 iterations each, in estimated 1.680097 s
 
ranking for 73 bytes
1. S.pack: mean 582.9643 ns (2p 580.5027 ns, 98p 601.8834 ns, out 8)
2. packLazy: mean 621.6827 ns (2p 587.6989 ns, 98p 980.0864 ns, out 18)
3. packStrict: mean 748.5686 ns (2p 664.3024 ns, 98p 1.319409 us, out 10)
 
running benchmarks for 80 bytes
collecting 100 samples, 25945 iterations each, in estimated 1.680076 s
collecting 100 samples, 26347 iterations each, in estimated 1.680056 s
collecting 100 samples, 22274 iterations each, in estimated 1.680060 s
 
ranking for 80 bytes
1. packLazy: mean 642.6829 ns (2p 615.3376 ns, 98p 684.0118 ns, out 0)
2. S.pack: mean 647.6266 ns (2p 635.6243 ns, 98p 719.7991 ns, out 11)
3. packStrict: mean 711.6751 ns (2p 693.2564 ns, 98p 764.0633 ns, out 16)
 
running benchmarks for 88 bytes
collecting 100 samples, 23059 iterations each, in estimated 1.680095 s
collecting 100 samples, 25409 iterations each, in estimated 1.680105 s
collecting 100 samples, 23200 iterations each, in estimated 1.680105 s
 
ranking for 88 bytes
1. packLazy: mean 652.7626 ns (2p 640.2240 ns, 98p 693.5776 ns, out 4)
2. S.pack: mean 705.6637 ns (2p 700.5295 ns, 98p 728.0293 ns, out 19)
3. packStrict: mean 732.3713 ns (2p 710.5336 ns, 98p 817.3054 ns, out 7)
 
running benchmarks for 97 bytes
collecting 100 samples, 21485 iterations each, in estimated 1.680092 s
collecting 100 samples, 23544 iterations each, in estimated 1.680075 s
collecting 100 samples, 22064 iterations each, in estimated 1.680113 s
 
ranking for 97 bytes
1. packLazy: mean 682.0707 ns (2p 668.8110 ns, 98p 734.5145 ns, out 14)
2. packStrict: mean 751.1182 ns (2p 746.7807 ns, 98p 775.0764 ns, out 10)
3. S.pack: mean 834.0932 ns (2p 763.6645 ns, 98p 1.230953 us, out 12)
 
running benchmarks for 107 bytes
collecting 100 samples, 19395 iterations each, in estimated 1.680085 s
collecting 100 samples, 22569 iterations each, in estimated 1.680060 s
collecting 100 samples, 20849 iterations each, in estimated 1.680053 s
 
ranking for 107 bytes
1. packLazy: mean 726.4912 ns (2p 717.9556 ns, 98p 750.4365 ns, out 4)
2. packStrict: mean 812.8577 ns (2p 792.8196 ns, 98p 883.0406 ns, out 8)
3. S.pack: mean 853.1497 ns (2p 835.8560 ns, 98p 919.3634 ns, out 13)
 
running benchmarks for 117 bytes
collecting 100 samples, 17775 iterations each, in estimated 1.680076 s
collecting 100 samples, 21259 iterations each, in estimated 1.680052 s
collecting 100 samples, 19516 iterations each, in estimated 1.680073 s
 
ranking for 117 bytes
1. packLazy: mean 797.4251 ns (2p 777.1377 ns, 98p 846.7581 ns, out 6)
2. packStrict: mean 855.7615 ns (2p 846.4880 ns, 98p 865.7110 ns, out 5)
3. S.pack: mean 965.9823 ns (2p 925.8173 ns, 98p 1.132765 us, out 16)
 
running benchmarks for 129 bytes
collecting 100 samples, 15944 iterations each, in estimated 1.680142 s
collecting 100 samples, 20233 iterations each, in estimated 1.680055 s
collecting 100 samples, 18864 iterations each, in estimated 1.680136 s
 
ranking for 129 bytes
1. packLazy: mean 825.4156 ns (2p 810.4235 ns, 98p 889.2816 ns, out 7)
2. packStrict: mean 891.7782 ns (2p 872.1549 ns, 98p 991.3720 ns, out 9)
3. S.pack: mean 1.041134 us (2p 997.9500 ns, 98p 1.117517 us, out 1)
 
running benchmarks for 142 bytes
collecting 100 samples, 14943 iterations each, in estimated 1.680078 s
collecting 100 samples, 18806 iterations each, in estimated 1.680074 s
collecting 100 samples, 17466 iterations each, in estimated 1.680124 s
 
ranking for 142 bytes
1. packLazy: mean 884.1229 ns (2p 862.6594 ns, 98p 951.8874 ns, out 8)
2. packStrict: mean 962.1931 ns (2p 940.7675 ns, 98p 1.040317 us, out 10)
3. S.pack: mean 1.120737 us (2p 1.087696 us, 98p 1.242849 us, out 9)
 
running benchmarks for 156 bytes
collecting 100 samples, 13405 iterations each, in estimated 1.680124 s
collecting 100 samples, 18542 iterations each, in estimated 1.680139 s
collecting 100 samples, 16719 iterations each, in estimated 1.680063 s
 
ranking for 156 bytes
1. packLazy: mean 916.1364 ns (2p 902.9943 ns, 98p 937.5013 ns, out 1)
2. packStrict: mean 1.006546 us (2p 980.5855 ns, 98p 1.062891 us, out 0)
3. S.pack: mean 1.217173 us (2p 1.196800 us, 98p 1.316321 us, out 8)
 
running benchmarks for 172 bytes
collecting 100 samples, 12595 iterations each, in estimated 1.680085 s
collecting 100 samples, 17533 iterations each, in estimated 1.680101 s
collecting 100 samples, 15639 iterations each, in estimated 1.680067 s
 
ranking for 172 bytes
1. packLazy: mean 974.9409 ns (2p 960.0246 ns, 98p 1.030335 us, out 12)
2. packStrict: mean 1.085609 us (2p 1.048369 us, 98p 1.136899 us, out 2)
3. S.pack: mean 1.317197 us (2p 1.310941 us, 98p 1.347856 us, out 9)
 
running benchmarks for 189 bytes
collecting 100 samples, 11399 iterations each, in estimated 1.680071 s
collecting 100 samples, 16001 iterations each, in estimated 1.680095 s
collecting 100 samples, 14703 iterations each, in estimated 1.680117 s
 
ranking for 189 bytes
1. packLazy: mean 1.029459 us (2p 1.022276 us, 98p 1.058355 us, out 11)
2. packStrict: mean 1.116106 us (2p 1.105251 us, 98p 1.186303 us, out 15)
3. S.pack: mean 1.442183 us (2p 1.426731 us, 98p 1.498521 us, out 3)
 
running benchmarks for 208 bytes
collecting 100 samples, 10667 iterations each, in estimated 1.680127 s
collecting 100 samples, 14274 iterations each, in estimated 1.680053 s
collecting 100 samples, 13882 iterations each, in estimated 1.680094 s
 
ranking for 208 bytes
1. packLazy: mean 1.116129 us (2p 1.083220 us, 98p 1.177723 us, out 0)
2. packStrict: mean 1.178487 us (2p 1.162324 us, 98p 1.212835 us, out 2)
3. S.pack: mean 1.637431 us (2p 1.615769 us, 98p 1.676924 us, out 2)
 
running benchmarks for 229 bytes
collecting 100 samples, 9664 iterations each, in estimated 1.680216 s
collecting 100 samples, 13833 iterations each, in estimated 1.680062 s
collecting 100 samples, 12896 iterations each, in estimated 1.680077 s
 
ranking for 229 bytes
1. packLazy: mean 1.173831 us (2p 1.161028 us, 98p 1.195151 us, out 2)
2. packStrict: mean 1.264378 us (2p 1.250195 us, 98p 1.299406 us, out 2)
3. S.pack: mean 1.730403 us (2p 1.718507 us, 98p 1.767073 us, out 16)
 
running benchmarks for 252 bytes
collecting 100 samples, 8883 iterations each, in estimated 1.680208 s
collecting 100 samples, 11428 iterations each, in estimated 1.680088 s
collecting 100 samples, 12138 iterations each, in estimated 1.680151 s
 
ranking for 252 bytes
1. packLazy: mean 1.295821 us (2p 1.254584 us, 98p 1.467542 us, out 18)
2. packStrict: mean 1.367655 us (2p 1.344659 us, 98p 1.503889 us, out 9)
3. S.pack: mean 1.954428 us (2p 1.905371 us, 98p 2.085745 us, out 6)
PackingWord8Lists.hs
Haskell
1 2 3 4 5 6 7 8 9 10 11 12
import qualified Data.Binary.Builder as B
 
S.pack -- from Data.ByteString
L.pack -- from Data.ByteString.Lazy
 
-- using Blaze.ByteString.Builder
packStrict = toByteString . fromWord8s
packLazy = toLazyByteString . fromWord8s
declPackLazy = toLazyByteString . mconcat . map fromWord8
 
-- using Data.Binary.Builder
binaryDeclPackLazy = B.toLazyByteString . mconcat . map B.singleton
PackingWord8Lists_results.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479
running benchmarks for 1 bytes
collecting 100 samples, 397452 iterations each, in estimated 1.680053 s
collecting 100 samples, 183111 iterations each, in estimated 1.680057 s
collecting 100 samples, 114632 iterations each, in estimated 1.680063 s
collecting 100 samples, 137729 iterations each, in estimated 1.680063 s
collecting 100 samples, 150487 iterations each, in estimated 1.680058 s
collecting 100 samples, 15010 iterations each, in estimated 1.680119 s
 
ranking for 1 bytes
1. S.pack: mean 42.36691 ns (2p 42.04676 ns, 98p 43.79724 ns, out 9)
2. packLazy: mean 93.86811 ns (2p 93.16447 ns, 98p 98.05169 ns, out 6)
3. declPackLazy: mean 112.3957 ns (2p 111.6002 ns, 98p 115.2775 ns, out 7)
4. L.pack: mean 124.2466 ns (2p 123.5213 ns, 98p 127.2078 ns, out 8)
5. packStrict: mean 155.7363 ns (2p 147.7531 ns, 98p 271.6574 ns, out 11)
6. Binary.declPackLazy: mean 1.116983 us (2p 1.104424 us, 98p 1.151337 us, out 7)
 
running benchmarks for 2 bytes
collecting 100 samples, 340182 iterations each, in estimated 1.680054 s
collecting 100 samples, 170301 iterations each, in estimated 1.680053 s
collecting 100 samples, 106835 iterations each, in estimated 1.680056 s
collecting 100 samples, 103375 iterations each, in estimated 1.680063 s
collecting 100 samples, 112402 iterations each, in estimated 1.680052 s
collecting 100 samples, 10499 iterations each, in estimated 1.680143 s
 
ranking for 2 bytes
1. S.pack: mean 50.10769 ns (2p 49.80380 ns, 98p 50.95555 ns, out 7)
2. packLazy: mean 99.19183 ns (2p 98.53455 ns, 98p 101.8828 ns, out 9)
3. declPackLazy: mean 148.2493 ns (2p 147.2159 ns, 98p 153.5846 ns, out 11)
4. packStrict: mean 156.4597 ns (2p 155.5876 ns, 98p 160.2425 ns, out 11)
5. L.pack: mean 158.1666 ns (2p 157.3447 ns, 98p 160.4989 ns, out 7)
6. Binary.declPackLazy: mean 1.595240 us (2p 1.586655 us, 98p 1.618654 us, out 7)
 
running benchmarks for 3 bytes
collecting 100 samples, 293259 iterations each, in estimated 1.680054 s
collecting 100 samples, 162080 iterations each, in estimated 1.680057 s
collecting 100 samples, 107418 iterations each, in estimated 1.680060 s
collecting 100 samples, 84116 iterations each, in estimated 1.680053 s
collecting 100 samples, 92242 iterations each, in estimated 1.680053 s
collecting 100 samples, 7937 iterations each, in estimated 1.680134 s
 
ranking for 3 bytes
1. S.pack: mean 56.19149 ns (2p 55.86708 ns, 98p 57.00423 ns, out 6)
2. packLazy: mean 102.0273 ns (2p 101.5695 ns, 98p 104.1533 ns, out 8)
3. packStrict: mean 157.7164 ns (2p 157.0076 ns, 98p 162.5208 ns, out 10)
4. declPackLazy: mean 184.0840 ns (2p 181.0837 ns, 98p 193.5170 ns, out 5)
5. L.pack: mean 203.3855 ns (2p 202.3566 ns, 98p 205.9964 ns, out 7)
6. Binary.declPackLazy: mean 2.102892 us (2p 2.070359 us, 98p 2.254732 us, out 7)
 
running benchmarks for 5 bytes
collecting 100 samples, 229671 iterations each, in estimated 1.680058 s
collecting 100 samples, 153306 iterations each, in estimated 1.680060 s
collecting 100 samples, 104029 iterations each, in estimated 1.680058 s
collecting 100 samples, 59474 iterations each, in estimated 1.680054 s
collecting 100 samples, 67849 iterations each, in estimated 1.680070 s
collecting 100 samples, 5889 iterations each, in estimated 1.680075 s
 
ranking for 5 bytes
1. S.pack: mean 73.44652 ns (2p 73.10126 ns, 98p 75.35551 ns, out 9)
2. packLazy: mean 107.7517 ns (2p 107.2401 ns, 98p 109.6976 ns, out 8)
3. packStrict: mean 161.3896 ns (2p 160.5087 ns, 98p 166.6332 ns, out 10)
4. declPackLazy: mean 244.6611 ns (2p 243.5477 ns, 98p 246.2353 ns, out 4)
5. L.pack: mean 279.9380 ns (2p 278.2321 ns, 98p 284.0109 ns, out 8)
6. Binary.declPackLazy: mean 2.853022 us (2p 2.837554 us, 98p 2.916263 us, out 5)
 
running benchmarks for 8 bytes
collecting 100 samples, 168807 iterations each, in estimated 1.680053 s
collecting 100 samples, 142715 iterations each, in estimated 1.680060 s
collecting 100 samples, 102537 iterations each, in estimated 1.680060 s
collecting 100 samples, 39999 iterations each, in estimated 1.680064 s
collecting 100 samples, 48584 iterations each, in estimated 1.680074 s
collecting 100 samples, 4131 iterations each, in estimated 1.680185 s
 
ranking for 8 bytes
1. S.pack: mean 95.03665 ns (2p 94.60147 ns, 98p 95.72631 ns, out 7)
2. packLazy: mean 116.4542 ns (2p 115.9460 ns, 98p 118.3518 ns, out 8)
3. packStrict: mean 169.0806 ns (2p 165.6498 ns, 98p 177.7163 ns, out 1)
4. declPackLazy: mean 351.7562 ns (2p 349.9539 ns, 98p 364.8030 ns, out 10)
5. L.pack: mean 418.0695 ns (2p 415.5713 ns, 98p 425.1340 ns, out 7)
6. Binary.declPackLazy: mean 4.096350 us (2p 4.062040 us, 98p 4.204783 us, out 4)
 
running benchmarks for 11 bytes
collecting 100 samples, 140628 iterations each, in estimated 1.680062 s
collecting 100 samples, 128341 iterations each, in estimated 1.680053 s
collecting 100 samples, 91803 iterations each, in estimated 1.680056 s
collecting 100 samples, 31700 iterations each, in estimated 1.680085 s
collecting 100 samples, 37602 iterations each, in estimated 1.680079 s
collecting 100 samples, 3209 iterations each, in estimated 1.680330 s
 
ranking for 11 bytes
1. S.pack: mean 122.1267 ns (2p 121.6077 ns, 98p 124.2060 ns, out 6)
2. packLazy: mean 134.2493 ns (2p 133.5971 ns, 98p 138.1229 ns, out 8)
3. packStrict: mean 185.8766 ns (2p 184.2026 ns, 98p 190.8854 ns, out 3)
4. declPackLazy: mean 454.1327 ns (2p 451.5809 ns, 98p 465.3353 ns, out 9)
5. L.pack: mean 568.9867 ns (2p 566.1374 ns, 98p 585.6315 ns, out 8)
6. Binary.declPackLazy: mean 5.249699 us (2p 5.220430 us, 98p 5.374151 us, out 7)
 
running benchmarks for 17 bytes
collecting 100 samples, 101591 iterations each, in estimated 1.680064 s
collecting 100 samples, 114538 iterations each, in estimated 1.680060 s
collecting 100 samples, 83906 iterations each, in estimated 1.680071 s
collecting 100 samples, 21361 iterations each, in estimated 1.680109 s
collecting 100 samples, 26381 iterations each, in estimated 1.680055 s
collecting 100 samples, 2253 iterations each, in estimated 1.680780 s
 
ranking for 17 bytes
1. packLazy: mean 146.5783 ns (2p 145.8587 ns, 98p 150.8604 ns, out 8)
2. S.pack: mean 157.6476 ns (2p 156.7418 ns, 98p 161.7925 ns, out 9)
3. packStrict: mean 201.7440 ns (2p 197.9036 ns, 98p 205.4349 ns, out 0)
4. declPackLazy: mean 641.0694 ns (2p 637.8288 ns, 98p 665.9282 ns, out 6)
5. L.pack: mean 758.7867 ns (2p 754.5768 ns, 98p 778.1838 ns, out 5)
6. Binary.declPackLazy: mean 7.592160 us (2p 7.453790 us, 98p 8.676948 us, out 8)
 
running benchmarks for 26 bytes
collecting 100 samples, 70492 iterations each, in estimated 1.680070 s
collecting 100 samples, 92783 iterations each, in estimated 1.680068 s
collecting 100 samples, 70144 iterations each, in estimated 1.680070 s
collecting 100 samples, 14781 iterations each, in estimated 1.680083 s
collecting 100 samples, 16545 iterations each, in estimated 1.680106 s
collecting 100 samples, 1531 iterations each, in estimated 1.680958 s
 
ranking for 26 bytes
1. packLazy: mean 179.7319 ns (2p 178.7662 ns, 98p 183.7221 ns, out 7)
2. S.pack: mean 227.7823 ns (2p 225.8781 ns, 98p 239.4191 ns, out 9)
3. packStrict: mean 239.8285 ns (2p 236.5204 ns, 98p 244.4543 ns, out 2)
4. declPackLazy: mean 970.3671 ns (2p 943.8798 ns, 98p 1.042806 us, out 4)
5. L.pack: mean 1.210573 us (2p 1.129176 us, 98p 1.464452 us, out 3)
6. Binary.declPackLazy: mean 11.32322 us (2p 10.82920 us, 98p 12.82448 us, out 7)
 
running benchmarks for 38 bytes
collecting 100 samples, 48522 iterations each, in estimated 1.680084 s
collecting 100 samples, 66155 iterations each, in estimated 1.680061 s
collecting 100 samples, 55769 iterations each, in estimated 1.680062 s
collecting 100 samples, 10320 iterations each, in estimated 1.680212 s
collecting 100 samples, 12628 iterations each, in estimated 1.680095 s
collecting 100 samples, 1105 iterations each, in estimated 1.680976 s
 
ranking for 38 bytes
1. packLazy: mean 243.8792 ns (2p 232.2281 ns, 98p 255.4122 ns, out 0)
2. packStrict: mean 300.4565 ns (2p 294.9155 ns, 98p 316.0018 ns, out 4)
3. S.pack: mean 361.7427 ns (2p 360.1751 ns, 98p 366.1029 ns, out 14)
4. declPackLazy: mean 1.341697 us (2p 1.334067 us, 98p 1.370899 us, out 6)
5. L.pack: mean 1.516298 us (2p 1.504291 us, 98p 1.559639 us, out 7)
6. Binary.declPackLazy: mean 15.09795 us (2p 15.01752 us, 98p 15.38049 us, out 5)
 
running benchmarks for 58 bytes
collecting 100 samples, 35958 iterations each, in estimated 1.680089 s
collecting 100 samples, 56435 iterations each, in estimated 1.680067 s
collecting 100 samples, 47114 iterations each, in estimated 1.680077 s
collecting 100 samples, 7365 iterations each, in estimated 1.680137 s
collecting 100 samples, 8264 iterations each, in estimated 1.680087 s
collecting 100 samples, 714 iterations each, in estimated 1.680614 s
 
ranking for 58 bytes
1. packLazy: mean 298.1229 ns (2p 297.0239 ns, 98p 303.0950 ns, out 9)
2. packStrict: mean 357.3650 ns (2p 355.6576 ns, 98p 364.2229 ns, out 8)
3. S.pack: mean 466.4179 ns (2p 464.0845 ns, 98p 480.2051 ns, out 6)
4. declPackLazy: mean 1.993662 us (2p 1.984783 us, 98p 2.018366 us, out 6)
5. L.pack: mean 2.362102 us (2p 2.346229 us, 98p 2.405213 us, out 7)
6. Binary.declPackLazy: mean 22.50452 us (2p 22.39453 us, 98p 23.07311 us, out 7)
 
running benchmarks for 86 bytes
collecting 100 samples, 24696 iterations each, in estimated 1.680074 s
collecting 100 samples, 25720 iterations each, in estimated 1.680103 s
collecting 100 samples, 23355 iterations each, in estimated 1.680081 s
collecting 100 samples, 4943 iterations each, in estimated 1.680273 s
collecting 100 samples, 5337 iterations each, in estimated 1.680189 s
collecting 100 samples, 501 iterations each, in estimated 1.682953 s
 
ranking for 86 bytes
1. packLazy: mean 656.3476 ns (2p 652.3432 ns, 98p 679.5424 ns, out 7)
2. S.pack: mean 685.6580 ns (2p 681.6657 ns, 98p 699.9925 ns, out 11)
3. packStrict: mean 722.9660 ns (2p 718.6310 ns, 98p 750.3279 ns, out 6)
4. declPackLazy: mean 3.182179 us (2p 3.163300 us, 98p 3.246757 us, out 5)
5. L.pack: mean 3.334985 us (2p 3.315262 us, 98p 3.419036 us, out 7)
6. Binary.declPackLazy: mean 33.22357 us (2p 33.02855 us, 98p 33.91451 us, out 8)
 
running benchmarks for 130 bytes
collecting 100 samples, 16425 iterations each, in estimated 1.680086 s
collecting 100 samples, 20905 iterations each, in estimated 1.680094 s
collecting 100 samples, 18965 iterations each, in estimated 1.680107 s
collecting 100 samples, 3367 iterations each, in estimated 1.680455 s
collecting 100 samples, 3608 iterations each, in estimated 1.680169 s
collecting 100 samples, 340 iterations each, in estimated 1.681679 s
 
ranking for 130 bytes
1. packLazy: mean 807.2429 ns (2p 801.8288 ns, 98p 822.4408 ns, out 5)
2. packStrict: mean 881.3719 ns (2p 876.9411 ns, 98p 897.5380 ns, out 5)
3. S.pack: mean 1.007845 us (2p 1.003182 us, 98p 1.032436 us, out 7)
4. declPackLazy: mean 4.641168 us (2p 4.611258 us, 98p 4.738342 us, out 10)
5. L.pack: mean 5.020240 us (2p 4.983451 us, 98p 5.139338 us, out 6)
6. Binary.declPackLazy: mean 50.47563 us (2p 49.23896 us, 98p 55.50112 us, out 20)
 
running benchmarks for 195 bytes
collecting 100 samples, 11379 iterations each, in estimated 1.680121 s
collecting 100 samples, 15875 iterations each, in estimated 1.680125 s
collecting 100 samples, 14761 iterations each, in estimated 1.680065 s
collecting 100 samples, 2213 iterations each, in estimated 1.680115 s
collecting 100 samples, 2402 iterations each, in estimated 1.680238 s
collecting 100 samples, 227 iterations each, in estimated 1.680690 s
 
ranking for 195 bytes
1. packLazy: mean 1.057220 us (2p 1.050239 us, 98p 1.087694 us, out 8)
2. packStrict: mean 1.143491 us (2p 1.134167 us, 98p 1.182488 us, out 7)
3. S.pack: mean 1.499107 us (2p 1.486739 us, 98p 1.543105 us, out 6)
4. declPackLazy: mean 6.880809 us (2p 6.829933 us, 98p 7.059806 us, out 5)
5. L.pack: mean 7.498894 us (2p 7.441169 us, 98p 7.781497 us, out 10)
6. Binary.declPackLazy: mean 74.07741 us (2p 73.35034 us, 98p 76.85066 us, out 11)
 
running benchmarks for 292 bytes
collecting 100 samples, 7567 iterations each, in estimated 1.680125 s
collecting 100 samples, 11841 iterations each, in estimated 1.680101 s
collecting 100 samples, 11074 iterations each, in estimated 1.680096 s
collecting 100 samples, 1452 iterations each, in estimated 1.681138 s
collecting 100 samples, 1660 iterations each, in estimated 1.680903 s
collecting 100 samples, 154 iterations each, in estimated 1.688097 s
 
ranking for 292 bytes
1. packLazy: mean 1.405837 us (2p 1.396197 us, 98p 1.459381 us, out 7)
2. packStrict: mean 1.511873 us (2p 1.501641 us, 98p 1.563910 us, out 9)
3. S.pack: mean 2.202803 us (2p 2.188381 us, 98p 2.252772 us, out 8)
4. declPackLazy: mean 10.24175 us (2p 10.17797 us, 98p 10.47110 us, out 9)
5. L.pack: mean 11.67740 us (2p 11.60420 us, 98p 11.92042 us, out 11)
6. Binary.declPackLazy: mean 110.5594 us (2p 109.9577 us, 98p 112.7418 us, out 9)
 
running benchmarks for 438 bytes
collecting 100 samples, 5174 iterations each, in estimated 1.680223 s
collecting 100 samples, 8624 iterations each, in estimated 1.680212 s
collecting 100 samples, 8097 iterations each, in estimated 1.680093 s
collecting 100 samples, 768 iterations each, in estimated 1.681960 s
collecting 100 samples, 1103 iterations each, in estimated 1.680463 s
collecting 100 samples, 103 iterations each, in estimated 1.692657 s
 
ranking for 438 bytes
1. packLazy: mean 1.954193 us (2p 1.943253 us, 98p 2.004960 us, out 10)
2. packStrict: mean 2.070312 us (2p 2.058189 us, 98p 2.120989 us, out 8)
3. S.pack: mean 3.352589 us (2p 3.334829 us, 98p 3.437979 us, out 10)
4. declPackLazy: mean 15.35523 us (2p 15.27399 us, 98p 15.68117 us, out 6)
5. L.pack: mean 19.85945 us (2p 18.75456 us, 98p 34.05657 us, out 11)
6. Binary.declPackLazy: mean 164.0617 us (2p 163.2472 us, 98p 166.3894 us, out 7)
 
running benchmarks for 657 bytes
collecting 100 samples, 3439 iterations each, in estimated 1.680459 s
collecting 100 samples, 6086 iterations each, in estimated 1.680110 s
collecting 100 samples, 5805 iterations each, in estimated 1.680202 s
collecting 100 samples, 581 iterations each, in estimated 1.681612 s
collecting 100 samples, 701 iterations each, in estimated 1.680748 s
collecting 100 samples, 69 iterations each, in estimated 1.692333 s
 
ranking for 657 bytes
1. packLazy: mean 2.767459 us (2p 2.756412 us, 98p 2.807339 us, out 10)
2. packStrict: mean 2.899388 us (2p 2.882262 us, 98p 2.968228 us, out 9)
3. S.pack: mean 4.884199 us (2p 4.861738 us, 98p 4.982848 us, out 6)
4. declPackLazy: mean 22.80751 us (2p 22.42270 us, 98p 25.05424 us, out 16)
5. L.pack: mean 29.35791 us (2p 29.18650 us, 98p 30.04318 us, out 10)
6. Binary.declPackLazy: mean 247.1371 us (2p 245.7173 us, 98p 252.6691 us, out 6)
 
running benchmarks for 985 bytes
collecting 100 samples, 2310 iterations each, in estimated 1.680329 s
collecting 100 samples, 4203 iterations each, in estimated 1.680332 s
collecting 100 samples, 4014 iterations each, in estimated 1.680262 s
collecting 100 samples, 378 iterations each, in estimated 1.683860 s
collecting 100 samples, 499 iterations each, in estimated 1.681207 s
collecting 100 samples, 46 iterations each, in estimated 1.704363 s
 
ranking for 985 bytes
1. packLazy: mean 3.990406 us (2p 3.969178 us, 98p 4.079048 us, out 9)
2. packStrict: mean 4.168370 us (2p 4.147828 us, 98p 4.265512 us, out 9)
3. S.pack: mean 7.346252 us (2p 7.310479 us, 98p 7.481958 us, out 7)
4. declPackLazy: mean 33.94947 us (2p 33.77452 us, 98p 34.82093 us, out 10)
5. L.pack: mean 46.24672 us (2p 46.01961 us, 98p 47.01285 us, out 10)
6. Binary.declPackLazy: mean 370.3748 us (2p 367.4207 us, 98p 381.2938 us, out 18)
 
running benchmarks for 1478 bytes
collecting 100 samples, 1473 iterations each, in estimated 1.680433 s
collecting 100 samples, 2891 iterations each, in estimated 1.680461 s
collecting 100 samples, 2779 iterations each, in estimated 1.680645 s
collecting 100 samples, 245 iterations each, in estimated 1.680456 s
collecting 100 samples, 330 iterations each, in estimated 1.684096 s
collecting 100 samples, 31 iterations each, in estimated 1.725239 s
 
ranking for 1478 bytes
1. packLazy: mean 5.812727 us (2p 5.778816 us, 98p 5.945745 us, out 11)
2. packStrict: mean 6.109193 us (2p 6.038172 us, 98p 6.749076 us, out 9)
3. S.pack: mean 11.42997 us (2p 10.85024 us, 98p 22.27916 us, out 10)
4. declPackLazy: mean 49.56672 us (2p 49.23226 us, 98p 50.92307 us, out 15)
5. L.pack: mean 70.37043 us (2p 69.58025 us, 98p 72.19409 us, out 10)
6. Binary.declPackLazy: mean 562.9986 us (2p 554.1410 us, 98p 582.0045 us, out 2)
 
running benchmarks for 2217 bytes
collecting 100 samples, 1024 iterations each, in estimated 1.680589 s
collecting 100 samples, 1965 iterations each, in estimated 1.680717 s
collecting 100 samples, 1881 iterations each, in estimated 1.680869 s
collecting 100 samples, 154 iterations each, in estimated 1.685816 s
collecting 100 samples, 223 iterations each, in estimated 1.682082 s
collecting 100 samples, 20 iterations each, in estimated 1.697943 s
 
ranking for 2217 bytes
1. packLazy: mean 8.541651 us (2p 8.496949 us, 98p 8.787222 us, out 10)
2. packStrict: mean 8.875170 us (2p 8.823692 us, 98p 9.070334 us, out 9)
3. S.pack: mean 16.69628 us (2p 16.58467 us, 98p 17.51257 us, out 11)
4. declPackLazy: mean 75.34633 us (2p 74.91644 us, 98p 77.41421 us, out 10)
5. L.pack: mean 106.1764 us (2p 105.3401 us, 98p 108.1385 us, out 8)
6. Binary.declPackLazy: mean 843.8287 us (2p 828.9615 us, 98p 860.6498 us, out 2)
 
running benchmarks for 3325 bytes
collecting 100 samples, 661 iterations each, in estimated 1.681415 s
collecting 100 samples, 1336 iterations each, in estimated 1.680169 s
collecting 100 samples, 1288 iterations each, in estimated 1.680815 s
collecting 100 samples, 99 iterations each, in estimated 1.685949 s
collecting 100 samples, 152 iterations each, in estimated 1.682637 s
collecting 100 samples, 14 iterations each, in estimated 1.797938 s
 
ranking for 3325 bytes
1. packLazy: mean 12.64744 us (2p 12.58269 us, 98p 12.93981 us, out 9)
2. packStrict: mean 13.09149 us (2p 13.03072 us, 98p 13.46810 us, out 10)
3. S.pack: mean 24.70616 us (2p 24.59227 us, 98p 25.21834 us, out 7)
4. declPackLazy: mean 112.1361 us (2p 111.4166 us, 98p 117.6875 us, out 12)
5. L.pack: mean 169.7062 us (2p 167.6403 us, 98p 172.6892 us, out 3)
6. Binary.declPackLazy: mean 1.281131 ms (2p 1.248734 ms, 98p 1.363740 ms, out 4)
 
running benchmarks for 4988 bytes
collecting 100 samples, 451 iterations each, in estimated 1.682185 s
collecting 100 samples, 848 iterations each, in estimated 1.681521 s
collecting 100 samples, 824 iterations each, in estimated 1.680109 s
collecting 100 samples, 64 iterations each, in estimated 1.704597 s
collecting 100 samples, 99 iterations each, in estimated 1.680288 s
collecting 100 samples, 9 iterations each, in estimated 1.691321 s
 
ranking for 4988 bytes
1. packLazy: mean 19.63518 us (2p 19.52646 us, 98p 20.18051 us, out 9)
2. packStrict: mean 20.40245 us (2p 20.30164 us, 98p 20.79710 us, out 8)
3. S.pack: mean 38.49410 us (2p 38.24701 us, 98p 39.97388 us, out 10)
4. declPackLazy: mean 169.1308 us (2p 168.1254 us, 98p 172.3953 us, out 8)
5. L.pack: mean 266.5207 us (2p 263.6116 us, 98p 271.8115 us, out 7)
6. Binary.declPackLazy: mean 1.889809 ms (2p 1.867045 ms, 98p 1.964497 ms, out 1)
 
running benchmarks for 7482 bytes
collecting 100 samples, 296 iterations each, in estimated 1.684877 s
collecting 100 samples, 576 iterations each, in estimated 1.680136 s
collecting 100 samples, 562 iterations each, in estimated 1.681551 s
collecting 100 samples, 40 iterations each, in estimated 1.715124 s
collecting 100 samples, 67 iterations each, in estimated 1.695932 s
collecting 100 samples, 6 iterations each, in estimated 1.684499 s
 
ranking for 7482 bytes
1. packLazy: mean 28.86534 us (2p 28.71605 us, 98p 29.84323 us, out 11)
2. packStrict: mean 29.86680 us (2p 29.68191 us, 98p 31.32946 us, out 8)
3. S.pack: mean 55.20610 us (2p 54.90638 us, 98p 56.90642 us, out 13)
4. declPackLazy: mean 251.3758 us (2p 250.0527 us, 98p 254.8993 us, out 7)
5. L.pack: mean 451.7959 us (2p 440.8567 us, 98p 463.1589 us, out 1)
6. Binary.declPackLazy: mean 2.840354 ms (2p 2.810248 ms, 98p 2.926140 ms, out 21)
 
running benchmarks for 11223 bytes
collecting 100 samples, 204 iterations each, in estimated 1.687299 s
collecting 100 samples, 392 iterations each, in estimated 1.681004 s
collecting 100 samples, 378 iterations each, in estimated 1.682927 s
collecting 100 samples, 22 iterations each, in estimated 1.719511 s
collecting 100 samples, 45 iterations each, in estimated 1.695508 s
collecting 100 samples, 4 iterations each, in estimated 1.695704 s
 
ranking for 11223 bytes
1. packLazy: mean 42.99339 us (2p 42.71564 us, 98p 44.84613 us, out 9)
2. packStrict: mean 44.35043 us (2p 44.14118 us, 98p 45.24784 us, out 8)
3. S.pack: mean 84.20941 us (2p 83.74169 us, 98p 85.79740 us, out 9)
4. declPackLazy: mean 377.5992 us (2p 374.8032 us, 98p 392.4909 us, out 12)
5. L.pack: mean 762.1843 us (2p 731.2050 us, 98p 788.5952 us, out 1)
6. Binary.declPackLazy: mean 4.240386 ms (2p 4.202295 ms, 98p 4.395157 ms, out 18)
 
running benchmarks for 16834 bytes
collecting 100 samples, 124 iterations each, in estimated 1.685628 s
collecting 100 samples, 259 iterations each, in estimated 1.686389 s
collecting 100 samples, 254 iterations each, in estimated 1.686620 s
collecting 100 samples, 12 iterations each, in estimated 1.752967 s
collecting 100 samples, 30 iterations each, in estimated 1.722760 s
collecting 100 samples, 3 iterations each, in estimated 1.895088 s
 
ranking for 16834 bytes
1. packLazy: mean 64.53212 us (2p 64.14755 us, 98p 67.89930 us, out 10)
2. packStrict: mean 66.68841 us (2p 66.30015 us, 98p 68.78391 us, out 9)
3. S.pack: mean 124.4696 us (2p 123.9557 us, 98p 126.6020 us, out 7)
4. declPackLazy: mean 577.4297 us (2p 557.3158 us, 98p 598.1454 us, out 1)
5. L.pack: mean 1.451479 ms (2p 1.377107 ms, 98p 1.525513 ms, out 0)
6. Binary.declPackLazy: mean 6.376452 ms (2p 6.324787 ms, 98p 6.626645 ms, out 15)
 
running benchmarks for 25251 bytes
collecting 100 samples, 91 iterations each, in estimated 1.689973 s
collecting 100 samples, 176 iterations each, in estimated 1.680663 s
collecting 100 samples, 168 iterations each, in estimated 1.684847 s
collecting 100 samples, 8 iterations each, in estimated 1.872420 s
collecting 100 samples, 19 iterations each, in estimated 1.715054 s
collecting 100 samples, 2 iterations each, in estimated 1.915097 s
 
ranking for 25251 bytes
1. packLazy: mean 95.72818 us (2p 95.28138 us, 98p 96.96914 us, out 9)
2. packStrict: mean 100.0887 us (2p 99.57449 us, 98p 102.8457 us, out 9)
3. S.pack: mean 203.5207 us (2p 202.5312 us, 98p 207.3173 us, out 8)
4. declPackLazy: mean 926.5837 us (2p 855.8115 us, 98p 1.570333 ms, out 6)
5. L.pack: mean 2.254537 ms (2p 2.130306 ms, 98p 2.489019 ms, out 0)
6. Binary.declPackLazy: mean 9.534774 ms (2p 9.457189 ms, 98p 10.04517 ms, out 15)
 
running benchmarks for 37877 bytes
collecting 100 samples, 57 iterations each, in estimated 1.705655 s
collecting 100 samples, 118 iterations each, in estimated 1.685168 s
collecting 100 samples, 114 iterations each, in estimated 1.691661 s
collecting 100 samples, 5 iterations each, in estimated 1.685873 s
collecting 100 samples, 13 iterations each, in estimated 1.774818 s
collecting 100 samples, 1 iterations each, in estimated 2.090907 s
 
ranking for 37877 bytes
1. packLazy: mean 143.1415 us (2p 142.4867 us, 98p 145.1926 us, out 8)
2. packStrict: mean 148.2489 us (2p 147.5404 us, 98p 152.5507 us, out 9)
3. S.pack: mean 290.6326 us (2p 289.2149 us, 98p 297.4324 us, out 8)
4. declPackLazy: mean 1.347112 ms (2p 1.278577 ms, 98p 1.403488 ms, out 0)
5. L.pack: mean 3.374166 ms (2p 3.259661 ms, 98p 3.606209 ms, out 0)
6. Binary.declPackLazy: mean 14.35220 ms (2p 14.20060 ms, 98p 15.73971 ms, out 10)
 
running benchmarks for 56815 bytes
collecting 100 samples, 40 iterations each, in estimated 1.693815 s
collecting 100 samples, 78 iterations each, in estimated 1.697598 s
collecting 100 samples, 75 iterations each, in estimated 1.683924 s
collecting 100 samples, 4 iterations each, in estimated 1.931286 s
collecting 100 samples, 9 iterations each, in estimated 1.742913 s
collecting 100 samples, 1 iterations each, in estimated 3.079605 s
 
ranking for 56815 bytes
1. packLazy: mean 214.8557 us (2p 213.7623 us, 98p 220.6368 us, out 9)
2. packStrict: mean 221.4092 us (2p 220.1800 us, 98p 227.7242 us, out 10)
3. S.pack: mean 437.8767 us (2p 435.6597 us, 98p 444.8970 us, out 8)
4. declPackLazy: mean 2.021597 ms (2p 1.935821 ms, 98p 2.201590 ms, out 0)
5. L.pack: mean 5.353420 ms (2p 4.922852 ms, 98p 5.966397 ms, out 0)
6. Binary.declPackLazy: mean 21.50190 ms (2p 21.31030 ms, 98p 23.46067 ms, out 11)
 
running benchmarks for 85223 bytes
collecting 100 samples, 26 iterations each, in estimated 1.699249 s
collecting 100 samples, 49 iterations each, in estimated 1.702069 s
collecting 100 samples, 48 iterations each, in estimated 1.714343 s
collecting 100 samples, 1 iterations each, in estimated 2.505088 s
collecting 100 samples, 6 iterations each, in estimated 1.748407 s
collecting 100 samples, 1 iterations each, in estimated 4.592490 s
 
ranking for 85223 bytes
1. packLazy: mean 354.0821 us (2p 351.6219 us, 98p 368.1146 us, out 10)
2. packStrict: mean 372.2121 us (2p 365.5113 us, 98p 434.3977 us, out 10)
3. S.pack: mean 629.9008 us (2p 626.6709 us, 98p 653.8255 us, out 9)
4. declPackLazy: mean 3.017359 ms (2p 2.859734 ms, 98p 3.386715 ms, out 0)
5. L.pack: mean 8.207751 ms (2p 6.558317 ms, 98p 10.98156 ms, out 0)
6. Binary.declPackLazy: mean 32.29095 ms (2p 31.98850 ms, 98p 35.11677 ms, out 13)
 
running benchmarks for 127834 bytes
collecting 100 samples, 18 iterations each, in estimated 1.721817 s
collecting 100 samples, 34 iterations each, in estimated 1.687198 s
collecting 100 samples, 34 iterations each, in estimated 1.725133 s
collecting 100 samples, 1 iterations each, in estimated 2.814698 s
collecting 100 samples, 1 iterations each, in estimated 2.294087 s
collecting 100 samples, 1 iterations each, in estimated 7.308698 s
 
ranking for 127834 bytes
1. packLazy: mean 484.2222 us (2p 481.7767 us, 98p 500.0947 us, out 10)
2. packStrict: mean 500.8598 us (2p 497.5484 us, 98p 517.1045 us, out 8)
3. S.pack: mean 975.7644 us (2p 969.5222 us, 98p 1.039483 ms, out 11)
4. declPackLazy: mean 4.608396 ms (2p 4.342474 ms, 98p 8.566989 ms, out 9)
5. L.pack: mean 12.82346 ms (2p 9.971889 ms, 98p 15.87284 ms, out 0)
6. Binary.declPackLazy: mean 48.47756 ms (2p 48.05829 ms, 98p 52.40812 ms, out 13)
 
running benchmarks for 191751 bytes
collecting 100 samples, 1 iterations each, in estimated 2.162814 s
collecting 100 samples, 1 iterations each, in estimated 1.704788 s
collecting 100 samples, 1 iterations each, in estimated 1.962709 s
collecting 100 samples, 1 iterations each, in estimated 3.829002 s
collecting 100 samples, 1 iterations each, in estimated 3.934288 s
collecting 100 samples, 1 iterations each, in estimated 10.49881 s
 
ranking for 191751 bytes
1. packLazy: mean 753.9593 us (2p 718.5303 us, 98p 943.5831 us, out 6)
2. packStrict: mean 832.3203 us (2p 782.5981 us, 98p 1.011847 ms, out 4)
3. S.pack: mean 1.449102 ms (2p 1.403507 ms, 98p 1.609973 ms, out 7)
4. declPackLazy: mean 6.903535 ms (2p 6.445540 ms, 98p 12.62383 ms, out 14)
5. L.pack: mean 19.94662 ms (2p 15.08283 ms, 98p 23.68619 ms, out 0)
6. Binary.declPackLazy: mean 72.79825 ms (2p 72.07039 ms, 98p 78.55463 ms, out 16)
SerializePeople.hs
Haskell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
data Person = Person { name :: String, age :: Int }
 
people = zipWith Person ["Haskell 98", "Switzerland", "λ-bot"] [12, 719, 7]
 
fromStringLen32le :: String -> Builder
fromStringLen32le cs =
fromInt32le (fromIntegral $ length cs) <> fromString cs
 
fromPerson :: Person -> Builder
fromPerson p =
fromStringLen32le (name p) <> fromInt32le (fromIntegral $ age p)
 
cloneVillage :: [Person]
cloneVillage = take 10000 $ cycle $ people
 
binaryCloneVillage :: Builder
binaryCloneVillage = mconcat $ map fromPerson cloneVillage
 
lazyBinaryCloneVillage :: L.ByteString
lazyBinaryCloneVillage = toLazyByteString binaryCloneVillage
 
strictBinaryCloneVillage :: S.ByteString
strictBinaryCloneVillage = toByteString binaryCloneVillage
fromWord8s.hs
Haskell
1 2 3 4 5 6 7 8 9 10
fromWord8s :: [Word8] -> Builder
fromWord8s = fromWrite8List writeWord8
 
writeWord8 :: Word8 -> Write
writeWord8 x = Write 1 (\pf -> poke pf x)
 
-- from Blaze.ByteString.Builder.Write
data Write = Write
{-# UNPACK #-} !Int -- Number of bytes that will be written.
(Ptr Word8 -> IO ()) -- Write the bytes starting from the given pointer

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.