Skip to content

deps: V8: cherry-pick 64b36b441179#61712

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

deps: V8: cherry-pick 64b36b441179#61712
rmagrin wants to merge 1 commit intonodejs:mainfrom
rmagrin:v8-backport-writeutf8v2

Conversation

@rmagrin
Copy link

@rmagrin rmagrin commented Feb 6, 2026

Cherry-picks V8 commit 64b36b441179 (ASCII fast path optimization in WriteUtf8V2).

This optimizes the WriteUtf8V2 path for ASCII-only one-byte strings by using SIMD-accelerated validation (simdutf::validate_ascii) followed by a bulk memcpy, instead of encoding byte-by-byte through the generic UTF-8 path.

Changes:

  • deps/v8/src/strings/unicode-inl.h — Added IsAsciiOneByteString template specializations and ASCII fast path in Encode
  • deps/v8/src/strings/unicode.h — Added IsAsciiOneByteString declarations
  • common.gypi — Incremented embedder string (-node.11-node.12)

References:

Original commit message:

    optimize ascii fast path in WriteUtf8V2

    Change-Id: If28168cb4395b953d0ec642ef4fc618ce963dbcd
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7124103
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Commit-Queue: Erik Corry <erikcorry@chromium.org>
    Reviewed-by: Erik Corry <erikcorry@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#103542}

Refs: v8/v8@64b36b4
@nodejs-github-bot
Copy link
Collaborator

Review requested:

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

@nodejs-github-bot 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 6, 2026
@rmagrin rmagrin mentioned this pull request Feb 6, 2026
4 tasks
@RafaelGSS
Copy link
Member

@targos
Copy link
Member

targos commented Feb 7, 2026

In file included from ../../deps/v8/src/runtime/runtime.h:14,
                 from ../../deps/v8/src/codegen/external-reference.h:9,
                 from ../../deps/v8/src/codegen/external-reference-table.h:11,
                 from ../../deps/v8/src/execution/isolate-data.h:10,
                 from ../../deps/v8/src/execution/isolate.h:33,
                 from ../../deps/v8/src/api/api.h:18,
                 from ../../deps/v8/src/api/api.cc:5:
../../deps/v8/src/strings/unicode.h:218:13: error: explicit specialization in non-namespace scope 'class unibrow::Utf8'
  218 |   template <>
      |             ^
../../deps/v8/src/strings/unicode.h:219:15: error: template-id 'IsAsciiOneByteString<uint8_t>' in declaration of primary template
  219 |   inline bool IsAsciiOneByteString<uint8_t>(const uint8_t* buffer, size_t size);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../deps/v8/src/strings/unicode.h:221:13: error: explicit specialization in non-namespace scope 'class unibrow::Utf8'
  221 |   template <>
      |             ^
../../deps/v8/src/strings/unicode.h:222:15: error: template-id 'IsAsciiOneByteString<uint16_t>' in declaration of primary template
  222 |   inline bool IsAsciiOneByteString<uint16_t>(const uint16_t* buffer,
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
make: Leaving directory '/home/runner/work/_temp/node-v26.0.0-nightly2026-02-07702401a1af-slim'

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

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

Development

Successfully merging this pull request may close these issues.

4 participants