Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign updec2flt is slower than it should be #30638
Comments
rkruppe
referenced this issue
Dec 30, 2015
Merged
Speed up dec2flt fast path with additional tables. #30639
steveklabnik
added
the
I-slow
label
Dec 31, 2015
brson
closed this
Jun 1, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rkruppe commentedDec 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.