Skip to content

[v26.x] build: enable V8 undefined double support - #66733

Open
inoway46 wants to merge 1 commit into
nodejs:v26.x-stagingfrom
inoway46:investigate-v26-bigjs-deopt
Open

inoway46 wants to merge 1 commit into
nodejs:v26.x-stagingfrom
inoway46:investigate-v26-bigjs-deopt

Conversation

@inoway46

@inoway46 inoway46 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

V8 14.6 enables v8_enable_undefined_double by default, but v26.x, which uses the same V8 14.6, never enabled it in its GYP build. This turned out to be the cause of the performance regression reported in #66717.

node/deps/v8/BUILD.gn

Lines 471 to 472 in e315417

# Use the encoding of undefined in double values.
v8_enable_undefined_double = true

I didn't backport 8394db37d800 from main as-is, since it updates the gypfiles for V8 14.8. This PR only adds the undefined double setting.

On macOS arm64, I've confirmed that this builds and that the repro from #66717 no longer hits the deopt loop: https://github.com/inoway46/node/actions/runs/44010080581

Fixes: #66717

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

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

@inoway46

This comment was marked as resolved.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. v26.x Issues that can be reproduced on v26.x or PRs targeting the v26.x-staging branch. v8 engine Issues and PRs related to the V8 dependency. labels Oct 14, 2026
@inoway46

This comment was marked as resolved.

@inoway46
inoway46 marked this pull request as ready for review October 15, 2026 02:22
@inoway46
inoway46 force-pushed the investigate-v26-bigjs-deopt branch from 77e8e5c to 01baaf5 Compare October 15, 2026 02:53
@inoway46
inoway46 marked this pull request as draft November 3, 2026 06:58
@inoway46 inoway46 closed this Nov 3, 2026
@inoway46 inoway46 reopened this Nov 17, 2026
@inoway46
inoway46 force-pushed the investigate-v26-bigjs-deopt branch 2 times, most recently from 9191949 to 646df72 Compare November 17, 2026 03:24
@inoway46
inoway46 marked this pull request as ready for review November 17, 2026 06:02
@inoway46

inoway46 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

@nodejs/v8-update This fixes a V8 build configuration issue by aligning our GYP build with V8 14.6's default settings. It was causing the performance regression reported in #66717 (found with big.js), and I've confirmed that this change resolves it both with and without Maglev (verification).
Could someone review this and start a full CI run?

@inoway46
inoway46 force-pushed the investigate-v26-bigjs-deopt branch from 646df72 to af155a5 Compare November 17, 2026 14:20
@aduh95
aduh95 force-pushed the v26.x-staging branch 2 times, most recently from c1cea0a to 4dd7c56 Compare November 17, 2026 15:54
@inoway46
inoway46 force-pushed the investigate-v26-bigjs-deopt branch from af155a5 to 5b79c46 Compare November 17, 2026 16:15
V8 14.6 enables v8_enable_undefined_double by default in its GN
build, but the GYP configuration never set V8_ENABLE_UNDEFINED_DOUBLE,
so the default build ran V8 in a non-default configuration. Enabling
it eliminates the repeated wrong-map deoptimizations in big.js
reported in nodejs#66717.

Align the GYP configuration with V8's default, matching the change
made on main in 8394db3.

Refs: nodejs@8394db3
Fixes: nodejs#66717
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
Assisted-by: Codex
Assisted-by: Claude Code
@inoway46
inoway46 force-pushed the investigate-v26-bigjs-deopt branch from 5b79c46 to 4663b6f Compare November 17, 2026 16:31
@inoway46 inoway46 added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 17, 2026
@github-actions github-actions Bot added request-ci-failed Starting CI with the request-ci label failed and requires manual intervention. and removed request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Failed to start CI

   ⚠  Commits were pushed since the last approving review:
   ⚠  - build: enable V8 undefined double support
   ✖  Refusing to run CI on potentially unsafe PR
Full Auto Start CI output
�[36m⠋�[39m Getting reviews from nodejs/node/pull/66733
�[36m⠋�[39m Getting commits from nodejs/node/pull/66733
   ⚠  Commits were pushed since the last approving review:
   ⚠  - build: enable V8 undefined double support
   ✖  Refusing to run CI on potentially unsafe PR

View workflow run

@inoway46

Copy link
Copy Markdown
Contributor Author

@legendecas Sorry, I had to rebase this again after v26.x-staging was rewritten, which blocked the CI start. The diff is unchanged. Could you re-approve when you have a chance?

@inoway46 inoway46 removed the request-ci-failed Starting CI with the request-ci label failed and requires manual intervention. label Nov 18, 2026
@inoway46
inoway46 requested a review from legendecas November 18, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. v8 engine Issues and PRs related to the V8 dependency. v26.x Issues that can be reproduced on v26.x or PRs targeting the v26.x-staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants