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

オープン
#157 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pocket-stack/quickjs-oxide のほかの issue

pocket-stack/quickjs-oxide の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。