Skip to content

Conversation

@Conaclos
Copy link
Member

Summary

This is a very small change that basically check if the number has a numeric separator _ before calling replace that allocates a string.
Also, I improved the prefix detection using a match.

Test Plan

No regression should be observed.

@github-actions github-actions bot added the L-JavaScript Language: JavaScript and super languages label May 30, 2025
Copy link
Contributor

@arendjr arendjr left a comment

Choose a reason for hiding this comment

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

Thanks!

I'm afraid to_f64() never gets called atm, but I expect we'll use it again at some point in the future, which is why I didn't want to throw it away just yet. So I hope your improvement will still provide some benefit then 😅

@Conaclos Conaclos merged commit 8e55a5c into main May 30, 2025
11 checks passed
@Conaclos Conaclos deleted the conaclos/type-info-literal-number-parsing branch May 30, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants