perf: skip idle release and cleanup work - #14
Open
Eric-Song-Nop wants to merge 4 commits into
Open
Conversation
This was referenced Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #13. Base:
perf/primitive-coercion-fast-path; head:perf/release-cleanup-fast-path, both inpocket-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:
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 / 验证
完整 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-2567656864382e9dac5116f6f6c616a0b355fdfca79b15f473c3c2457281195d4ea. All 437 manifest members verified remotely; local download hash matches. Retained in local/remote workspacetarget/, not attached to GitHub. Includes exact production/counter ELFs, patches, perf data, complete Test262 vectors, logs and scripts; external benchmark sources excluded.Refs #9.