Size of Chunk in Data.ByteString.Lazy

523 Views Asked by At

Module Data.ByteString.Lazy contain own implementation of ByteString type:

data ByteString = Empty | Chunk !S.ByteString ByteString

And there are following phrase about size of chunk:

The default chunk size is 64k, which should be good in most circumstances. For people with large L2 caches, you may want to increase this to fit your cache.

But nothing about how to do it. How can I increase default chunk size? Also, whether I will get an increase of performance, if chuck size will be significantly greater than those L2 cache?

1

There are 1 best solutions below

0
On BEST ANSWER

It looks like you have to edit the source and install manually.

Chunk sizes are set at the end of Data.ByteString.Lazy.Internal.