perf(object): skip array-key interning for non-arrays - #11
Open
Eric-Song-Nop wants to merge 2 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 #5. Base:
perf/profilor; head:perf/array-own-key-early-check, both inpocket-stack/quickjs-oxide. Review and merge in dependency order.Migrated from Eric-Song-Nop#1 with identical commits and preserved measurement/validation evidence.
修改 / Change
Generic property operations call
array_own_keyfor ordinary objects too. Previously those calls interned"length"before returningOther. Check the payload first so non-arrays skip that work. End the state borrow before interning to avoid a RefCell conflict; preserve genuine Array length/index classification.通用属性操作也会对普通对象调用
array_own_key。此前非数组在返回Other前会无用地 intern"length";现在先检查 payload,非数组立即返回。intern 前结束 state 借用,避免 RefCell 冲突,保留真正数组的 length/index 分类。Related issue / 关联 issue: #6
实测 / Measurements
Same PocketLab machine, matching release build flags, diagnostics disabled, five repetitions per version/workload with alternating order. All 20 runs passed output checks. / 同一 PocketLab 机器、相同 release 参数、关闭诊断,每版本每工作负载五次交替运行,20 次输出校验全部通过。
Whole-process times include startup/compilation/teardown; harness scores and fixed-workload times are separate metrics. This is one machine/workload family, not a general guarantee; CPU stacks and array-heavy performance were not remeasured. / 进程耗时包括启动、编译和收尾;harness 分数与固定工作量耗时是不同指标。这是单机单类工作负载结果,不是普遍收益保证;本次未重新采集 CPU 栈或数组密集型性能。
Report / 报告 · All samples, outputs and hashes / 全部样本、输出和哈希
验证 / Validation
--lib --bins --features profiling): passed / 通过。