Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Ryū or DragonBox algorithm library to speed up float-to-string conversion #9030

Open
gengliqi opened this issue May 10, 2024 · 0 comments
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@gengliqi
Copy link
Contributor

gengliqi commented May 10, 2024

Enhancement

Ryū paper: https://dl.acm.org/doi/pdf/10.1145/3296979.3192369
Ryū C++ implementation by author: https://github.com/ulfjack/ryu

BTW, the strconv in Go's standard library has already used Ryū algorithm. (See golang/go#15672).

DragonBox: https://github.com/jk-jeon/dragonbox

TiFlash uses https://github.com/google/double-conversion to convert float to string.
Clickhouse changed double-conversion to Ryu in this PR ClickHouse/ClickHouse#8542.
Then it changed to DragonBox in this PR ClickHouse/ClickHouse#17831.

We need to investigate it further to choose which one will be used.

@gengliqi gengliqi added the type/enhancement The issue or PR belongs to an enhancement. label May 10, 2024
@gengliqi gengliqi changed the title Use Ryū algorithm library to speed up float-to-string conversion Use Ryū or DragonBox algorithm library to speed up float-to-string conversion May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant