Skip to content

Optimize parsing decimals from strings #10666

Description

@neilconway

Is your feature request related to a problem or challenge?

There's room for a lot of optimization. e.g., we currently scan the entire input string multiple times (for trimming and string-based splitting), do various unnecessary heap allocations, use format! to produce the result, and re-parse using i256::from_string multiple times. For large inputs beyond the target type's scale, we don't need to look at the tail of the string.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. added
    enhancement
    on Aug 12, 2026
  2. neilconway commented on Aug 12, 2026

    @neilconway
    ContributorAuthor

    take

  3. changed the title [-]Parsing decimals from strings is very slow[/-] [+]Optimize parsing decimals from strings[/+] on Aug 12, 2026
  4. added a commit that references this issue on Aug 18, 2026
    078c0f1
  5. added a commit that references this issue on Aug 19, 2026
    bbfa4fc
  6. added 3 commits that reference this issue on Aug 26, 2026
    4b5f40b
    a151a27
    0ba9431
  7. added 3 commits that reference this issue on Sep 18, 2026
    4e3e877
    956a803
    2b49b14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions