Skip to content

Optimizations opportunities in to_chars (grisu2) #1450

@lemire

Description

@lemire

Our grisu2 implementation of to_chars is adapted from JSON for Modern C++. We have no reason to think that it is fastest or best optimized. It is likely that we should replace it with a more recent algorithm. However, there might be some optimization opportunities to the existing implementation such as...

  • line 810 : branching could be avoided
  • line 122 : a fast clz function might be better

credit : @agavrel

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions