Skip to content

Add optional support for digit separators and cpp prefixes#369

Open
zaewc wants to merge 11 commits into
fastfloat:mainfrom
zaewc:main
Open

Add optional support for digit separators and cpp prefixes#369
zaewc wants to merge 11 commits into
fastfloat:mainfrom
zaewc:main

Conversation

@zaewc

@zaewc zaewc commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

Add optional support in from_chars_advanced to:

  • skip a configurable digit separator (e.g. ')
  • skip standard cpp prefixes (0x/0X, 0b/0B) before parsing (decimal-only; no hex/binary floats)

Resolves #124

no measurable regression on standard inputs (canada.txt / mesh.txt).

@lemire

lemire commented Feb 15, 2026

Copy link
Copy Markdown
Member

Thanks, to be reviewed.

@lemire

lemire commented Jun 6, 2026

Copy link
Copy Markdown
Member

I rebased the PR here : https://github.com/fastfloat/fast_float/tree/pr-369-rebase

I get that this PR slows down the performance by 5% to 10%.

We could hack things so that the it is performance neutral.

But I am not convinced. I don't know who needs this feature. I am concerned about adding a function that nobody would use but that we would need to maintain.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature?: ignored characters `'_ / allowing prefixs 0x and 0b etc...

2 participants