[wasm-custom-desc] Fast path for installing methods [v8/v8 : main]

1 view
Skip to first unread message

Jakob Kummerow (Gerrit)

unread,
Nov 12, 2025, 6:15:46 AM (7 days ago) Nov 12
to Jakob Kummerow, Igor Sheludko, v8-re...@googlegroups.com
Attention needed from Igor Sheludko

Jakob Kummerow voted and added 1 comment

Votes added by Jakob Kummerow

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Jakob Kummerow . resolved

WDYT, is this a good approach? This basically duplicates small bits of `lookup.cc`, which I'm not too happy about, but it does provide significant speedups, so perhaps the complexity is justifiable? I'm open to massaging / widening / restricting the fast path if you think that improves the situation.

Open in Gerrit

Related details

Attention is currently required from:
  • Igor Sheludko
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ia448034977d63e20aea4d0c3b156602f9a2d3be3
Gerrit-Change-Number: 7146400
Gerrit-PatchSet: 1
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
Gerrit-Comment-Date: Wed, 12 Nov 2025 11:15:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Jakob Kummerow (Gerrit)

unread,
Nov 12, 2025, 6:20:11 AM (7 days ago) Nov 12
to Jakob Kummerow, V8 LUCI CQ, Igor Sheludko, v8-re...@googlegroups.com
Attention needed from Igor Sheludko

Jakob Kummerow added 1 comment

File src/runtime/runtime-wasm.cc
Line 1695, Patchset 1 (Latest): // perspective it'd be fine to just bail out of the fast path; but the
Jakob Kummerow . resolved

An earlier local version of this patch did that, but making sure that we don't screw things up when bailing out was messy and brittle, so I've changed it to this now and I think that's simpler and more robust.

Open in Gerrit

Related details

Attention is currently required from:
  • Igor Sheludko
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ia448034977d63e20aea4d0c3b156602f9a2d3be3
Gerrit-Change-Number: 7146400
Gerrit-PatchSet: 1
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
Gerrit-Comment-Date: Wed, 12 Nov 2025 11:20:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Igor Sheludko (Gerrit)

unread,
Nov 17, 2025, 5:03:48 AM (2 days ago) Nov 17
to Jakob Kummerow, V8 LUCI CQ, v8-re...@googlegroups.com
Attention needed from Jakob Kummerow

Igor Sheludko voted and added 3 comments

Votes added by Igor Sheludko

Code-Review+1

3 comments

Patchset-level comments
Igor Sheludko . resolved

lgtm with comments

File src/runtime/runtime-wasm.cc
Line 1442, Patchset 1 (Latest): // here, but that would have a significant performance cost, so for now
Igor Sheludko . unresolved

Probably not that big if we had `strict_function_with_NAME_AND_readonly_prototype_map` (it's just a two liner to add it).

Line 1445, Patchset 1 (Latest): if (fast_path) {
Igor Sheludko . unresolved

I guess we should invalidate the prototype's validity cell at the end of all stores just in case someone already relies on it (on both throwing and non-throwing paths).

Open in Gerrit

Related details

Attention is currently required from:
  • Jakob Kummerow
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ia448034977d63e20aea4d0c3b156602f9a2d3be3
Gerrit-Change-Number: 7146400
Gerrit-PatchSet: 1
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Comment-Date: Mon, 17 Nov 2025 10:03:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Jakob Kummerow (Gerrit)

unread,
Nov 17, 2025, 3:21:56 PM (2 days ago) Nov 17
to Jakob Kummerow, Igor Sheludko, V8 LUCI CQ, v8-re...@googlegroups.com
Attention needed from Igor Sheludko

Jakob Kummerow voted and added 3 comments

Votes added by Jakob Kummerow

Auto-Submit+1
Commit-Queue+1

3 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Jakob Kummerow . resolved

Thanks for the review and the great comments! I've addressed them; and it turned out that including the bug fix we discussed offline in this CL was really easy; but updating the test lost the +1. PTAL.

File src/runtime/runtime-wasm.cc
Line 1442, Patchset 1: // here, but that would have a significant performance cost, so for now
Igor Sheludko . resolved

Probably not that big if we had `strict_function_with_NAME_AND_readonly_prototype_map` (it's just a two liner to add it).

Jakob Kummerow

Thanks for that idea! Added it to the comment in case we need it in the future.

Line 1445, Patchset 1: if (fast_path) {
Igor Sheludko . resolved

I guess we should invalidate the prototype's validity cell at the end of all stores just in case someone already relies on it (on both throwing and non-throwing paths).

Jakob Kummerow

Good point, thanks! Done.

Open in Gerrit

Related details

Attention is currently required from:
  • Igor Sheludko
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ia448034977d63e20aea4d0c3b156602f9a2d3be3
Gerrit-Change-Number: 7146400
Gerrit-PatchSet: 2
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Attention: Igor Sheludko <ish...@chromium.org>
Gerrit-Comment-Date: Mon, 17 Nov 2025 20:21:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Igor Sheludko <ish...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Igor Sheludko (Gerrit)

unread,
Nov 18, 2025, 10:09:29 AM (22 hours ago) Nov 18
to Jakob Kummerow, V8 LUCI CQ, v8-re...@googlegroups.com
Attention needed from Jakob Kummerow

Igor Sheludko voted and added 1 comment

Votes added by Igor Sheludko

Code-Review+1
Commit-Queue+2

1 comment

Patchset-level comments
Igor Sheludko . resolved

lgtm

Open in Gerrit

Related details

Attention is currently required from:
  • Jakob Kummerow
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ia448034977d63e20aea4d0c3b156602f9a2d3be3
Gerrit-Change-Number: 7146400
Gerrit-PatchSet: 2
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Attention: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Comment-Date: Tue, 18 Nov 2025 15:09:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

V8 LUCI CQ (Gerrit)

unread,
Nov 18, 2025, 10:10:55 AM (22 hours ago) Nov 18
to Jakob Kummerow, Igor Sheludko, v8-re...@googlegroups.com

V8 LUCI CQ submitted the change

Change information

Commit message:
[wasm-custom-desc] Fast path for installing methods

This patch adds a fast path for the common case of installing
non-conflicting methods on previously-empty prototype objects.
This saves about 10ms for 100K methods.
Bug: 403372470
Change-Id: Ia448034977d63e20aea4d0c3b156602f9a2d3be3
Reviewed-by: Igor Sheludko <ish...@chromium.org>
Auto-Submit: Jakob Kummerow <jkum...@chromium.org>
Commit-Queue: Igor Sheludko <ish...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#103793}
Files:
  • M src/runtime/runtime-wasm.cc
  • M test/mjsunit/wasm/custom-descriptors-interop.js
Change size: M
Delta: 2 files changed, 210 insertions(+), 19 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Igor Sheludko
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: Ia448034977d63e20aea4d0c3b156602f9a2d3be3
Gerrit-Change-Number: 7146400
Gerrit-PatchSet: 3
Gerrit-Owner: Jakob Kummerow <jkum...@chromium.org>
Gerrit-Reviewer: Igor Sheludko <ish...@chromium.org>
Gerrit-Reviewer: Jakob Kummerow <jkum...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages