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

dec2flt is slower than it should be #30638

Closed
rkruppe opened this Issue Dec 30, 2015 · 0 comments

Comments

Projects
None yet
3 participants
@rkruppe
Copy link
Member

rkruppe commented Dec 30, 2015

To some degree, slowness is unavoidable because correctly parsing floats can get pretty hard. However, @Veedrac has recently demonstrated that a simple, obvious, not-correct-in-general implementation is easily 5x faster than the current "fast path". I am certain this can be improved, if not to equal performance then at least to something between 1x and 2x.

On the other end of the spectrum, the slow path is very slow indeed. Here it's less a question of micro optimization and more of smart algorithms. The glibc approach sounds promising and would also solve a long-standing issue of not being able to handle some pathological inputs. There's no better implementation to benchmark against, other than perhaps libc::strtod, so I have no idea how much room for improvement there is and when this issue could be considered "closed". We'll see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.