Project

General

Profile

Actions

Feature #22256

open

Replace missing/dtoa.c with a uscale-based algorithm. Faster, smaller footprint, and fixes a rounding error.

Feature #22256: Replace missing/dtoa.c with a uscale-based algorithm. Faster, smaller footprint, and fixes a rounding error.

Added by AndrewDile (Andrew Dile) 7 days ago. Updated 1 day ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:126459]

Description

I'm proposing a replacement of missing/dtoa.c with a faster, leaner, more correct algorithm. I have a PR open as a proposed solution, which also provides more details to the origin of the algorithm and its performance compared to missing/dtoa.c.

This would solve a few edge case rounding issues that currently happen during Float#to_s, and it would significantly increase the performance of Float#to_s and String#to_f, all while unifying both formatting (shortest-width and fixed-width) and parsing under one primitive.


Related issues 1 (1 open0 closed)

Related to Ruby - Feature #21308: Replacing the Float#to_s (dtoa.c) implementation with a modern algorithmOpenActions
Actions

Also available in: PDF Atom