haskell / haskell/binary

optimize small Getters

未关闭
#124 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Haskell
星标
120
派生
70
PR 合并指标
30 天内没有已合并 PR

描述

After some profiling, i came to the conclusion that current running logic is too complex, in order to support `bytesRead`, we have two `Decoder` type, the overhead of `runGetIncremental` is noticeable when the getter is small(around 100ns compare to cereal on my machine).

This gives binary a disadvantage in various benchmarks, since lots of benchmark just focus on a single combinator, the overhead of running it render this kind of benchmarks meaningless.

There're cases we do need running small getters, but i haven't really need `bytesRead` yet. So let's find a way to improve `bytesRead`, or remove it ?

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先检查 issue 中描述的两个 Decoder 类型和 runGetIncremental 路径,然后使用现有基准测试复现报告中的小 getter 开销。将 bytesRead 要求与不需要它的情况进行比较,并确定是否可以改进或移除该要求。在不丢失所需 bytesRead 行为的情况下减少小 getter 开销,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
haskell
领域
backend
Issue 类型
重构
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。