`<charconv>`: `from_chars()` for `float` uses unnecessarily large structures
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
I noticed that the from_chars implementations for both float and double use the _Floating_point_string structure, which is huge (almost 800byte). The structure appears to be allocated on the stack only.
I don't know how many bytes are needed for the float conversion, but certainly a lot less than the 800 bytes for the double conversion.
Maybe it is worth to use a (much) smaller structure for from_chars for float values?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the from_chars implementations for float and double in and inspect _Floating_point_string to measure which storage is needed for each conversion. Done means the float path uses a smaller structure while preserving conversion behavior; run the relevant charconv tests to verify it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100