Skip to content

perf: skip idle release and cleanup work - #14

Open
Eric-Song-Nop wants to merge 4 commits into
perf/primitive-coercion-fast-pathfrom
perf/release-cleanup-fast-path
Open

perf: skip idle release and cleanup work#14
Eric-Song-Nop wants to merge 4 commits into
perf/primitive-coercion-fast-pathfrom
perf/release-cleanup-fast-path

Conversation

@Eric-Song-Nop

@Eric-Song-Nop Eric-Song-Nop commented Sep 10, 2026

Copy link
Copy Markdown

Stacked on #13. Base: perf/primitive-coercion-fast-path; head: perf/release-cleanup-fast-path, both in pocket-stack/quickjs-oxide. Review and merge in dependency order.

Migrated from Eric-Song-Nop#4 with identical commits and preserved measurement/validation evidence.

Reference releases and Runtime boundaries repeatedly enter empty deferred/heap cleanup. This adds a cached pending check and guarded drainer, shares release/restoration application, and skips absent heap cleanup while preserving existing checkpoints, restoration priority, reference validation and iterative destruction.

引用释放与 Runtime 边界反复进入空清理流程。本改动封装 pending/draining 状态、共享释放/恢复逻辑,并跳过无工作量的 Heap 清理;保留原有检查点、队列优先级、引用检查和立即迭代销毁。

Results / 结果

90 uninstrumented runs: six repetitions per workload/version, all six permutations of Before → Runtime-only → Final. Final median elapsed-time changes against #13:

Workload / 负载 Before ms Final ms Time reduction / 耗时下降
Property ×20m / 属性负载 6232.549 5620.119 9.83%
Fixed Richards ×10 1476.607 1147.185 22.31%
Original Richards harness 6170.316 5100.399 17.34%
Chain release / 链式释放 362.614 326.934 9.84%
Integer loop ×10m / 空循环 1538.679 1545.590 -0.45%

Empty-loop ranges overlap: no gain established; a small regression remains possible. Property work includes loop/accumulation. No controlled CPU frequency or full system isolation. / 空循环范围重叠,不作改善结论;属性负载不是单独查找计时,未锁频或完全隔离系统。

18 CPU samples and 36 separate counter runs support attribution. In fixed Richards, deferred slow-path entries fall 35,077,874 → 1, zero-queue drain entries 15,359,417 → 517,456. Object retains/releases, the 24 applied deferred operations, 1,947 nonempty drains and 1,948 processed nodes remain unchanged. Every fixed workload retains the same real work counts across all three versions. Other cleanup paths still do some empty work. CPU leaf-symbol percentages are not logical call counts; counter-build timing is not used for performance claims.

独立计数确认实际引用操作与销毁工作量不变,减少的是空路径;CPU 内联归属变化与逻辑调用次数分开解释,不使用探针构建作性能结论。

Validation / 验证

  • Runtime stage: 3008 Rust tests passed; final logic: 3010 passed, 0 failed, one existing ignored, Rust 1.88 workspace/all-targets/profiling. Eight new regressions cover queue priority, guard error/unwind reset, borrow conflicts, immediate cascading destruction, teardown and whole-zero-queue semantics.
  • Format, source layout, Rust-only and strict production Clippy for profiling/default/test262-host passed. Production binary boundary passed; all 690 isolation canaries rejected.
  • Fresh full Test262 before/after: 102037 outcome rows identical, zero changed outcomes/new failures. Both frozen full-file gates still exit 1 because only the first source-fingerprint header changed; no baseline updated.

完整 Test262 结果逐行一致;冻结文件校验仍因指纹头变化失败,没有更新基线。重型工作全部在远端 Herdr/PocketLab 串行执行。

完整双语报告 / Full bilingual report · Machine-readable evidence

Raw archive: quickjs-oxide-release-cleanup-pocketlab-2026-09-09.tar.gz, 63,169,351 bytes, SHA-256 7656864382e9dac5116f6f6c616a0b355fdfca79b15f473c3c2457281195d4ea. All 437 manifest members verified remotely; local download hash matches. Retained in local/remote workspace target/, not attached to GitHub. Includes exact production/counter ELFs, patches, perf data, complete Test262 vectors, logs and scripts; external benchmark sources excluded.

Refs #9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant