microsoft / microsoft/STL

`<charconv>`: Investigate using a new algorithm for `to_chars()` decimal shortest

Open
#1,189 9 comments 3 reactions 1 assignee View on GitHub

@StephanTLavavej is already working on this.

Since Aug 13, 2020.

performance
Dominant language
C++
Stars
11.2k
Forks
1.7k
Avg merge
4d 15h
Merged PRs (30d)
22

Description

Repo: https://github.com/jk-jeon/Grisu-Exact

Reddit posts: Aug 2020 and earlier Jan 2020.

It is a variant of Grisu2 a classic float-to-string conversion algorithm developed by Florian Loitsch, and is largely inspired by Ryu, another float-to-string conversion algorithm developed by Ulf Adams. The main strength of Grisu-Exact over Ryu is that it performs better for short numbers.

The algorithm's inventor and implementer, Junekey Jeon, has graciously licensed this code so that it's compatible with microsoft/STL (the bulk of the code is dual Apache 2.0 + LLVM / Boost; fp_to_chars.cpp is Apache 2.0 / Boost as it's derived from Ryu). 😻

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.