René's URL Explorer Experiment


Title: Deoptimization loop ("wrong map") in big.js Big.prototype.div makes code ~6x slower on v26, not on v24 · Issue #66717 · nodejs/node · GitHub

Open Graph Title: Deoptimization loop ("wrong map") in big.js Big.prototype.div makes code ~6x slower on v26, not on v24 · Issue #66717 · nodejs/node

X Title: Deoptimization loop ("wrong map") in big.js Big.prototype.div makes code ~6x slower on v26, not on v24 · Issue #66717 · nodejs/node

Description: Version v26.11.1 Platform Darwin L1845 25.6.0 Darwin Kernel Version 25.6.0: Tue Aug 18 17:49:13 PDT 2026; root:xnu-12377.161.15.700.19~2/RELEASE_ARM64_T6000 arm64 Subsystem v8 engine What steps will reproduce the bug? mkdir repro && cd r...

Open Graph Description: Version v26.11.1 Platform Darwin L1845 25.6.0 Darwin Kernel Version 25.6.0: Tue Aug 18 17:49:13 PDT 2026; root:xnu-12377.161.15.700.19~2/RELEASE_ARM64_T6000 arm64 Subsystem v8 engine What steps wil...

X Description: Version v26.11.1 Platform Darwin L1845 25.6.0 Darwin Kernel Version 25.6.0: Tue Aug 18 17:49:13 PDT 2026; root:xnu-12377.161.15.700.19~2/RELEASE_ARM64_T6000 arm64 Subsystem v8 engine What steps wil...

Opengraph URL: https://github.com/nodejs/node/issues/66717

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Deoptimization loop (\"wrong map\") in big.js Big.prototype.div makes code ~6x slower on v26, not on v24","articleBody":"### Version\n\nv26.11.1\n\n### Platform\n\n```text\nDarwin L1845 25.6.0 Darwin Kernel Version 25.6.0: Tue Aug 18 17:49:13 PDT 2026; root:xnu-12377.161.15.700.19~2/RELEASE_ARM64_T6000 arm64\n```\n\n### Subsystem\n\nv8 engine\n\n### What steps will reproduce the bug?\n\n```bash\nmkdir repro && cd repro\nnpm init -y && npm pkg set type=module\nnpm install big.js@7.0.1\n```\n\n`repro.mjs`:\n\n```js\nimport Big from 'big.js'\n\n// Deterministic PRNG (mulberry32)\nlet seed = Number(process.argv[2] ?? 1) >>> 0\nconst random = () => {\n  seed = (seed + 0x6d2b79f5) >>> 0\n  let t = seed\n  t = Math.imul(t ^ (t >>> 15), t | 1)\n  t ^= t + Math.imul(t ^ (t >>> 7), t | 61)\n  return ((t ^ (t >>> 14)) >>> 0) / 4294967296\n}\n\nlet sink = 0\nconst start = performance.now()\nfor (let i = 0; i \u003c 300000; i++) {\n  const a = Big((random() * 30).toFixed(2))\n  const b = Big((random() * 5 + 0.5).toFixed(i % 3))\n  sink += Number(a.times(b).div(i % 2 ? Big(1.255) : b.plus(1)).round(2))\n}\nconsole.log(`${process.version} took ${Math.round(performance.now() - start)} ms (${sink > 0})`)\n```\n\n```bash\nnode repro.mjs 2\nnode --trace-deopt repro.mjs 2 2>&1 | grep -c \"JSFunction P.div\"\n```\n\n### How often does it reproduce? Is there a required condition?\n\nDeterministic with seed 2 (6/6 runs on both v26.7.0 and v26.11.1). Whether the loop starts depends on\nthe input sequence: with seeds 1..12, seeds 2, 3, 7 and 9 trigger it on v26 and none trigger it on v24.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nP.div should deoptimize a few times, after which V8 should reoptimize it with updated feedback.\nThis is what happens on v24.21.0: 1-3 deopts of P.div for every seed, and every run takes ~1.0-1.1 s.\n\n### What do you see instead?\n\nOn v26, `P.div` is deoptimized thousands of times at the same bytecode offset with the same reason,\nand the run is ~6x slower:\n\n| | v24.21.0 | v26.7.0 | v26.11.1 |\n|---|---|---|---|\n| `node repro.mjs 1` | ~1,040 ms | ~1,030 ms | ~1,010 ms |\n| `node repro.mjs 2` | ~1,075 ms | **6,620–8,640 ms** | **~6,600 ms** |\n| `P.div` deopts, seed 2 | 2 | **~5,150** | **~5,600** |\n\nEvery deopt has the same signature (v26.11.1):\n\n```\n[bailout (kind: deopt-eager, reason: wrong map): begin. deoptimizing 0x3e332d0efef9 \u003cJSFunction P.div (sfi = 0x3e332d0ee969)>, 0x2cf238c84509 \u003cCode MAGLEV>, opt id 2, bytecode offset 447, deopt exit 39, FP to SP delta 240, caller SP 0x00016fb98c20, pc 0x000115b8ba88]\n```\n\nBytecode offset 447 is a `Dec` bytecode (`--rl`) in `r[--rl] \u003c bt[rl]` in big.js `div`\n(https://github.com/MikeMcl/big.js/blob/v7.0.1/big.mjs#L410):\n\n```\n10242 S> @  445 : 0b ea             Ldar r15\n         @  447 : 5a 4f             Dec FBV[79]\n         @  449 : c3                Star15\n10247 E> @  450 : 35 eb 50          GetKeyedProperty r14, FBV[80]\n```\n\nThe loop is not specific to Maglev. With `--no-maglev`, TurboFan code loops at the same offset with the same reason:\n\n| Flags (v26.11.1, seed 2) | `P.div` deopts | Deoptimized code | Time |\n|---|---|---|---|\n| (default) | 5,649 | Maglev | 6,614 ms |\n| `--no-maglev` | 855 | TurboFan, offset 447, `wrong map` | 6,850 ms |\n| `--no-maglev-osr` | 5,709 | Maglev | 6,621 ms |\n| `--no-turbofan` | 5,713 | Maglev | 6,640 ms |\n\n### Additional information\n\nWe noticed this through a performance smoke test in a calculation library that uses big.js\nfor all arithmetic. On v26 the test became ~30% slower and flaky in CI (GitHub Actions\nubuntu-latest, x64), while v22 and v24 were stable. In that test suite the same signature appears:\n~1,250 \"wrong map\" deopts of P.div at bytecode offset 447.\n\nThe repro above was measured only on macOS arm64; the CI symptom suggests Linux x64 is also affected,\nbut I did not verify the deopt trace there.\n\nPossibly related, but a different symptom: #66457 (Maglev OSR correctness bug, also v24.11/v26,\nalso repeated eager deopts of the same code). --no-maglev-osr does not help here.","author":{"url":"https://github.com/timoly","@type":"Person","name":"timoly"},"datePublished":"2026-10-14T06:25:04Z","url":"https://github.com/nodejs/node/issues/66717"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:99cd8355-a476-169f-75f5-53d1f7bf1efc
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB592:147263:6E2EF:95A68:6AED0492
html-safe-noncef423d92878472bf0bc7e340a1725f9e1907edb0343d29ae11daaa1fa469b688c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTkyOjE0NzI2Mzo2RTJFRjo5NUE2ODo2QUVEMDQ5MiIsInZpc2l0b3JfaWQiOiIxNTgwOTc4MTYzNTMxMTg3MzQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1e55ba046c9f29599897a52869e3d98c3de4f3052363f4840c3f575b2121a1f2
hovercard-subject-tagissue:5843041941
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/66717/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7e2e74af662e720a1f912701b12a1c2a33218c9b1e3a674d448c96f88df6c3f3/nodejs/node/issues/66717
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7e2e74af662e720a1f912701b12a1c2a33218c9b1e3a674d448c96f88df6c3f3/nodejs/node/issues/66717
og:image:altVersion v26.11.1 Platform Darwin L1845 25.6.0 Darwin Kernel Version 25.6.0: Tue Aug 18 17:49:13 PDT 2026; root:xnu-12377.161.15.700.19~2/RELEASE_ARM64_T6000 arm64 Subsystem v8 engine What steps wil...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametimoly
hostnamegithub.com
expected-hostnamegithub.com
None21e10c535436b2122cfb44c76dfb4af296e371850fb60de16776f8a64e5c3ed8
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release302a6d707c3288a5f951258a2fa3e926b8c8f8cf
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/66717#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F66717
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F66717
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/66717
Reloadhttps://github.com/nodejs/node/issues/66717
Reloadhttps://github.com/nodejs/node/issues/66717
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues654 (654)https://github.com/nodejs/node/issues
Pull requests666 (666)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66717
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66717
Deoptimization loop ("wrong map") in big.js Big.prototype.div makes code ~6x slower on v26, not on v24https://github.com/nodejs/node/issues/66717#top
https://github.com/timoly
timolyhttps://github.com/timoly
on Oct 14, 2026https://github.com/nodejs/node/issues/66717#issue-5843041941
https://github.com/MikeMcl/big.js/blob/v7.0.1/big.mjs#L410https://github.com/MikeMcl/big.js/blob/v7.0.1/big.mjs#L410
#66457https://github.com/nodejs/node/issues/66457
https://github.com/lazerg
lazerghttps://github.com/lazerg
on Oct 14, 2026https://github.com/nodejs/node/issues/66717#issuecomment-6162779525
#65161https://github.com/nodejs/node/pull/65161
https://github.com/inoway46
inoway46https://github.com/inoway46
on Oct 15, 2026https://github.com/nodejs/node/issues/66717#issuecomment-6182937652
nodejs/node@8394db37d800https://github.com/nodejs/node/commit/8394db37d8004219fa30985675d5e6a4cac63556
#66733https://github.com/nodejs/node/pull/66733
https://github.com/inoway46/node/actions/runs/38592855428https://github.com/inoway46/node/actions/runs/38592855428
inoway46https://github.com/inoway46
on Oct 15, 2026https://github.com/nodejs/node/issues/66717#event-33291355561
build: enable V8 undefined double supporthttps://github.com/inoway46/node/commit/01baaf5c8ec1e5293f7b4231d1195b4e4672846d
01baaf5https://github.com/inoway46/node/commit/01baaf5c8ec1e5293f7b4231d1195b4e4672846d
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/66717
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66717
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.