Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

deps: V8: cherry-pick 67507b2a88f4#61825

Open
rmagrin wants to merge 1 commit intonodejs:mainfrom
rmagrin:v8-backport-highway-ascii
Open

deps: V8: cherry-pick 67507b2a88f4#61825
rmagrin wants to merge 1 commit intonodejs:mainfrom
rmagrin:v8-backport-highway-ascii

Conversation

Copy link
Contributor

rmagrin commented Feb 14, 2026 *
edited
Loading

Summary

Cherry-picks two V8 commits (squashed) to add Highway-based WriteLeadingAscii and fix its GCC build:

  • 67507b2a88f4 -- Reland "use highway to check and copy leading ascii" (Dan Carney)
    Replaces IsAsciiOneByteString + memcpy with Highway WriteLeadingAscii in Utf8::Encode, providing a faster ASCII fast path for WriteUtf8V2.
    CL: https://chromium-review.googlesource.com/c/v8/v8/+/7184338

  • ee2873a6303d -- Fix GCC Build (Abdirahim Musse)
    Moves WriteLeadingAscii explicit template specializations to namespace scope -- C++ forbids them inside class scope, and GCC rejects it.
    CL: https://chromium-review.googlesource.com/c/v8/v8/+/7138905

    Note: only the unicode.h portion of this commit is included; the test file changes (heap-unittest.cc, module-decoder-unittest.cc) do not apply cleanly to Node.js's V8 copy and are unrelated to the WriteLeadingAscii fix.

This patch addresses part of the remaining ~30-40% performance gap in WriteUtf8V2 vs v22 after #61712 landed the initial simdutf + memcpy fast path.

Refs: #60719

Test plan

  • CI: V8 CI + Node.js CI

bricss reacted with rocket emoji
Copy link
Collaborator

nodejs-github-bot commented Feb 14, 2026

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/v8-update

nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. labels Feb 14, 2026
Renegade334 previously requested changes Feb 15, 2026
Copy link
Member

Renegade334 left a comment *
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs the unicode.h aspects of v8/v8@ee2873a to unblock gcc builds.

rmagrin and gurgunday reacted with thumbs up emoji
rmagrin force-pushed the v8-backport-highway-ascii branch from 9acf475 to eb0d45c Compare February 15, 2026 16:23
rmagrin changed the title deps: V8: cherry-pick Highway string performance patches deps: V8: cherry-pick 67507b2a88f4 Feb 15, 2026
rmagrin force-pushed the v8-backport-highway-ascii branch from eb0d45c to a215fe8 Compare February 15, 2026 16:48
Renegade334 dismissed their stale review February 16, 2026 19:08

stale

rmagrin force-pushed the v8-backport-highway-ascii branch 2 times, most recently from 883bf5e to ad11612 Compare February 17, 2026 05:15
Copy link
Contributor Author

rmagrin commented Feb 17, 2026 *
edited
Loading

I decide to keep only one backport on this PR and the Fix GCC Build (ee2873a6303d).

I will open another PR once this is merged with the backport for https://chromium-review.googlesource.com/c/v8/v8/+/7159233

Renegade334 reviewed Feb 17, 2026
Copy link
Member

Renegade334 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this violates the commit-rebase policy, as each individual commit needs to (in principle) independently pass CI, which isn't the case here. I would just edit the backport commit to include the small change to the header, don't know what you reckon @targos?

Copy link
Contributor Author

rmagrin commented Feb 18, 2026

I believe this violates the commit-rebase policy, as each individual commit needs to (in principle) independently pass CI, which isn't the case here. I would just edit the backport commit to include the small change to the header, don't know what you reckon @targos?

I missed that requirement. Happy to fix the PR to have a single commit. I just need a confirmation that it is the right approach for this case.

Copy link
Member

targos commented Feb 18, 2026

It's the right approach. git node v8 backport has a flag (--squash) to generate a single commit: https://github.com/nodejs/node-core-utils/blob/main/docs/git-node.md#git-node-v8-backport-sha

rmagrin reacted with thumbs up emoji

Original commit messages:

Reland "use highway to check and copy leading ascii"

This is a reland of commit a3e84e5f01540cec142f4d4f41f1921373c220e5

Original change's description:
> use highway to check and copy leading ascii
>
> Change-Id: I065532aeeee95273821aa1f25b5ffc5c5c23cbf1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7172479
> Reviewed-by: Patrick Thier
> Reviewed-by: Toon Verwaest
> Commit-Queue: Dan Carney
> Cr-Commit-Position: refs/heads/main@{#103820}

Change-Id: I43b4ad18817eb52b701e112d2d0a5f685374ae1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7184338
Reviewed-by: Toon Verwaest
Reviewed-by: Patrick Thier
Commit-Queue: Dan Carney
Cr-Commit-Position: refs/heads/main@{#103865}

Fix GCC Build

Move explicit specializations of Utf8::IsAsciiOneByteString to namespace
scope

C++ forbids explicit template specializations inside class scope.
The specializations for IsAsciiOneByteString and
IsAsciiOneByteString were defined inside class unibrow::Utf8,
riggering "explicit specialization in non-namespace scope"
compile errors.

Fix type mismatch in EXPECT_EQ comparisons for std::pair values

The tests failed because EXPECT_EQ was comparing pairs with mismatched
template parameters -- std::pair vs.
std::pair -- which have no valid operator==.
I corrected the expected values to use the same unsigned types as the
actual data, ensuring the pair comparison compiles cleanly.

Fix build failure on GCC 12 by replacing std::format with ostringstream

GCC 12's libstdc++ does not implement , causing compile errors
when using std::format. Replaced all std::format calls with equivalent

Change-Id: I5c31f91065eccf6f4c14172902ffcd99863ebbb9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7138905
Commit-Queue: Clemens Backes
Reviewed-by: Jakob Kummerow
Reviewed-by: Clemens Backes
Commit-Queue: Jakob Kummerow
Cr-Commit-Position: refs/heads/main@{#104280}

Refs: v8/v8@67507b2
Refs: v8/v8@ee2873a
rmagrin force-pushed the v8-backport-highway-ascii branch from ad11612 to f9dd983 Compare February 19, 2026 04:16
targos approved these changes Feb 19, 2026
targos added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 19, 2026
github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 19, 2026
Copy link
Collaborator

nodejs-github-bot commented Feb 19, 2026

Copy link
Collaborator

nodejs-github-bot commented Feb 19, 2026

Copy link
Collaborator

nodejs-github-bot commented Feb 19, 2026

Copy link
Collaborator

nodejs-github-bot commented Feb 19, 2026

Renegade334 approved these changes Feb 19, 2026
Copy link
Contributor Author

rmagrin commented Mar 2, 2026

@Renegade334 is there anything pending from my side that allow this to be merged?

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

Reviewers

targos targos approved these changes

Renegade334 Renegade334 approved these changes

Assignees

No one assigned

Labels

build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants