Skip to content

Conversation

nilptr
Copy link
Contributor

@nilptr nilptr commented Sep 21, 2025

Description:

  • update the threshold for dec-to-hex conversion.

BREAKING CHANGE:

Related issue (if exists): #11111

@nilptr nilptr requested a review from a team as a code owner September 21, 2025 15:56
Copy link

changeset-bot bot commented Sep 21, 2025

⚠️ No Changeset found

Latest commit: 5f8eba0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nilptr nilptr force-pushed the nilptr/feat/codegen-number branch from 272c277 to 4815b18 Compare September 21, 2025 16:08
Copy link

codspeed-hq bot commented Sep 21, 2025

CodSpeed Performance Report

Merging #11112 will not alter performance

Comparing nilptr:nilptr/feat/codegen-number (5f8eba0) with main (72a53a0)

Summary

✅ 140 untouched

@nilptr
Copy link
Contributor Author

nilptr commented Sep 21, 2025

reference:

hex_len hex dec dec_len hex_len - dec_len hex_len - (dec_len + 1)
3 (2 + 1) 0x0–0x9 0–9 1 2 ❌ 1 ❌
0xA–0xF 10–15 2 1 ❌ 0
4 (2 + 2) 0x10–0x63 16–99 2 2 ❌ 1 ❌
0x64–0xFF 100–255 3 1 ❌ 0
5 (2 + 3) 0x100–0x3E7 256–999 3 2 ❌ 1 ❌
0x3E8–0xFFF 1,000–4,095 4 1 ❌ 0
6 (2 + 4) 0x1000–0x270F 4,096–9,999 4 2 ❌ 1 ❌
0x2710–0xFFFF 10,000–65,535 5 1 ❌ 0
7 (2 + 5) 0x10000–0x1869F 65,536–99,999 5 2 ❌ 1 ❌
0x186A0–0xF423F 100,000–999,999 6 1 ❌ 0
0xF4240–0xFFFFF 1,000,000–1,048,575 7 0 -1 ✅
8 (2 + 6) 0x100000–0x98967F 1,048,576–9,999,999 7 1 ❌ 0
0x989680–0xFFFFFF 10,000,000–16,777,215 8 0 -1 ✅
9 (2 + 7) 0x1000000–0x5F5E0FF 16,777,216–99,999,999 8 1 ❌ 0
0x5F5E100–0xFFFFFFF 100,000,000–268,435,455 9 0 -1 ✅
10 (2 + 8) 0x10000000–0x3B9AC9FF 268,435,456–999,999,999 9 1 ❌ 0
0x3B9ACA00–0xFFFFFFFF 1,000,000,000–4,294,967,295 10 0 -1 ✅
11 (2 + 9) 0x100000000–0x2540BE3FF 4,294,967,296–9,999,999,999 10 1 ❌ 0
0x2540BE400–0xFFFFFFFFF 10,000,000,000–68,719,476,735 11 0 -1 ✅
12 (2 + 10) 0x1000000000–0x174876E7FF 68,719,476,736–99,999,999,999 11 1 ❌ 0
0x174876E800–0xE8D4A50FFF 100,000,000,000–999,999,999,999 12 0 -1 ✅
0xE8D4A51000–0xFFFFFFFFFF 1,000,000,000,000–1,099,511,627,775 13 -1 ✅ -2 ✅
13 (2 + 11) 0x10000000000–0x9184E729FFF 1,099,511,627,776–9,999,999,999,999 13 0 -1 ✅
0x9184E72A000–0xFFFFFFFFFFF 10,000,000,000,000–17,592,186,044,415 14 -1 ✅ -2 ✅

@nilptr nilptr force-pushed the nilptr/feat/codegen-number branch from 4815b18 to 5f8eba0 Compare September 21, 2025 16:15
@kdy1 kdy1 added this to the Planned milestone Sep 22, 2025
@kdy1
Copy link
Member

kdy1 commented Sep 22, 2025

Can you run UPDATE=1 cargo test -p swc_ecma_minifier?

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

Successfully merging this pull request may close these issues.

2 participants