Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upImprove String.toFloat and String.toInt #817
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
process-bot
Jan 20, 2017
Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Jan 20, 2017
|
Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
evancz
added some commits
Jan 20, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Just a heads up, I'm working on the perf part / fixing some errors. |
evancz
added some commits
Jan 20, 2017
evancz
closed this
Jan 20, 2017
evancz
deleted the
evancz-patch-1
branch
Jan 20, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Okay, this is superseded by https://github.com/elm-lang/core/pull/818 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
evancz commentedJan 20, 2017
•
edited
Edited 1 time
-
evancz
edited Jan 20, 2017 (most recent)
This should allow each parser to accept a broader range of inputs and parse them more quickly.
For example,
toFloatcan now handle scientific notation like1e40, andtoIntcan handle hexadecimal like0xBEEF.This change relies on the fact that
+strandNumber(str)do the same thing, and thatNumberis more restrictive in parsing thanparseIntandparseFloat. This is based on information from this and this.I believe it will be faster, but I have not confirmed this.
Remaining Tasks