Add Proxy trap dispatch benchmarks#2666
Merged
Merged
Conversation
lahma
enabled auto-merge (squash)
July 13, 2026 12:51
New ProxyBenchmark lane measuring per-operation Proxy trap machinery: get/set/has through an explicit handler vs an empty forwarding handler, ownKeys via Object.keys, apply/construct on a function proxy, revocable create+revoke churn, and typeof on a revoked function proxy (must not throw). Prepared scripts on a single engine, standard MemoryDiagnoser lane layout. No product code changes. ConstructTrap passes two constructor arguments on purpose: a single numeric argument currently trips Array(n) length semantics when JsProxy.Construct builds the trap argumentsList via the Array constructor instead of CreateArrayFromList. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EsHuKuE4UihKZp5HYapDHE
This was referenced Jul 15, 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.
Adds
ProxyBenchmarkcovering the proxy internal-method surface ahead of a series of Proxy correctness/performance PRs:TrapGet/TrapSet/TrapHas— hot loops through a handler withget/set/hastrapsForwardGet/ForwardSet— empty handler, measures the forwarding overhead a proxy adds over direct accessOwnKeysTrap/OwnKeysForward—Object.keysover a 10-property targetApplyTrap/ApplyForward/ConstructTrapRevocableCreate(create + revoke cycle),RevokedTypeof(typeofon a revoked function proxy)No product code changes. Follows house benchmark conventions (MemoryDiagnoser, default job, prepared scripts, single engine).
Note:
ConstructTrapdeliberately constructs with two arguments — the single-numeric-argument construct path currently mangles the trap's arguments list (fix in a follow-up PR), and two arguments keep this lane's numbers comparable before and after that fix.🤖 Generated with Claude Code
https://claude.ai/code/session_01EsHuKuE4UihKZp5HYapDHE