Execution slow paths: inline-cache misses (Gameboy), typed-array access (zlib), array stores (Sieve)

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

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust
领域
performance

调研方向

Start with the ic-stats build (qjs --ic-stats) to locate Gameboy cache misses, then profile the execution paths named in the issue: Heap::shape_lookup, typed::fast_get, typed::fast_set, and array::set_at. The issue gives no source files or tests, so trace those entry points and reproduce the three benchmarks before changing anything. Done means all three are within 1.1× QuickJS and no other suite program regresses by more than 2%.

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

描述

Programs in the suite that run slower than QuickJS 2026-06-04 because of execution, not compilation (perf record, 0.3.0 release build; compiler share under 1% in all three):

Program Time vs QuickJS Hot path
Octane Gameboy 2.10× Heap::shape_lookup 26.4%, property::get_cached 10.8%, property::slot_value 3.4%
Octane zlib 1.27× typed::fast_get 17.4%, typed::fast_set 5.7%
AWFY Sieve 1.24× array::set_at 10.8%, property::set_on 3.2%, Heap::set_element 2.9%
  • Gameboy: property reads miss the inline caches and fall to shape_lookup. Find the sites with the ic-stats build (qjs --ic-stats): polymorphic or megamorphic sites, or objects in dictionary mode.
  • zlib: typed-array element reads and writes are out-of-line calls from the loop; the element kind check and access belong in the instruction's fast path.
  • Sieve: element stores take the generic set_at path; the dense-array store fast path does not cover this case (likely an Array(n) hole or a write at length).

Acceptance: each program within 1.1× of QuickJS, with no other suite program slower by more than 2%.

主要语言
Rust
星标
61
派生
2
PR 合并指标
30 天内没有已合并 PR

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

pocket-stack/quickjs-oxide 的其他 Issue

查看 pocket-stack/quickjs-oxide 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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