Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Example browser benchmark

未关闭
#3 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
javascript

调研方向

从链接的 pull-block-browserbench 项目开始,检查 manyPairs、manyTriplets 和 bigBuffers 场景,并比较此 issue 中 dev、master 和 v1.2.0 的结果。确定该方法是否覆盖了足够的案例,并找出比较各实现所需的其他案例;完成的标准是形成一份有文档记录的 benchmark 计划,其中包含已达成共识的覆盖范围和结论。

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

描述

It isn't the prettiest framework, but it produced some insights.
https://github.com/Beanow/pull-block-browserbench

To test the #2 theories. There's a "dev" version of pull-block there which has the implementation without any concat or slices, using only alloc and copy. PR #4

var tests = {
	// Suspected worst-case.
	manyPairs: test({
		inSize: 16*KB,
		inCount: 10000,
		blockSize: 30*KB
	}),

	// Suspected worst-case.
	manyTriplets: test({
		inSize: 11*KB,
		inCount: 14000,
		blockSize: 30*KB
	}),

	// Large incoming buffers scenario.
	bigBuffers: test({
		inSize: 20*MB,
		inCount: 1,
		blockSize: 50*KB
	})
}
Firefox:
Test manyPairs with pull-block dev ran an average of 107ms
Test manyPairs with pull-block master ran an average of 257ms
Test manyPairs with pull-block v1.2.0 ran an average of 178ms
Test manyTriplets with pull-block dev ran an average of 105ms
Test manyTriplets with pull-block master ran an average of 318ms
Test manyTriplets with pull-block v1.2.0 ran an average of 186ms
Test bigBuffers with pull-block dev ran an average of 39ms
Test bigBuffers with pull-block master ran an average of 23ms
Test bigBuffers with pull-block v1.2.0 ran an average of 2951ms

Chromium:
Test manyPairs with pull-block dev ran an average of 63ms
Test manyPairs with pull-block master ran an average of 99ms
Test manyPairs with pull-block v1.2.0 ran an average of 57ms
Test manyTriplets with pull-block dev ran an average of 61ms
Test manyTriplets with pull-block master ran an average of 101ms
Test manyTriplets with pull-block v1.2.0 ran an average of 66ms
Test bigBuffers with pull-block dev ran an average of 25ms
Test bigBuffers with pull-block master ran an average of 16ms
Test bigBuffers with pull-block v1.2.0 failed: RangeError: Array buffer allocation failed

So it's a gain, but certainly not as big of a difference as the previous patch. And interestingly it seems my previous patch slightly regressed performance for the high volume scenario.

I do suppose that these tests don't cover enough cases to decide which is better. Hence I'm putting it up as a separate issue. Does this make sense as a test method and what more cases does it need?

主要语言
JavaScript
星标
7
派生
3
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dignifiedquire/pull-block 的其他 Issue

查看 dignifiedquire/pull-block 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

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