模块Data.ByteString.Lazy
包含自己的ByteString
类型实现:
data ByteString = Empty | Chunk !S.ByteString ByteString
和there以下是关于 block 大小的短语:
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.
但是没有任何关于如何做到这一点的信息。如何增加默认 block 大小?另外,如果卡盘大小明显大于那些 L2 缓存,我是否会获得性能提升?
最佳答案
看来您必须编辑源代码并手动安装。
block 大小已设置 at the end of Data.ByteString.Lazy.Internal .
关于haskell - Data.ByteString.Lazy 中 block 的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7804645/