Add vector version of mapAccumL that behaves like the list version
- 主要语言
- Haskell
- 星标
- 400
- 派生
- 145
- PR 合并指标
- 30 天内没有已合并 PR
描述
I've implemented a hand rolled version, and another two versions based on a combination of `mapM` and the lazy and strict versions of `State` monad.
https://github.com/haskell-works/hw-prim/pull/38
The benchmarks show that the hand rolled versions run two times faster than the lazy state monad version and 16 times faster than the strict state monad version.
I found the slow performance of the strict monad version most surprising.
I'm aware that the version that using `mapM` might enable fusion, however it is a fair bit slower than a hand rolled version that defeats fusion.
I would love to have a fusion-enabled version that runs as fast as the hand rolled version. Would that be possible?
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。