Dmitry
Dmitry

Reputation: 5269

Size of Chunk in Data.ByteString.Lazy

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?

Upvotes: 5

Views: 526

Answers (1)

dave4420
dave4420

Reputation: 47052

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

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

Upvotes: 3

Related Questions