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
gh-118750: Asymptotically faster int(string)
#118751
Conversation
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Skip news? |
Co-authored-by: sstandre <43125375+sstandre@users.noreply.github.com>
Co-authored-by: sstandre <43125375+sstandre@users.noreply.github.com>
Premature, I think. It's possible that a later version may become actively used. |
We only need a news entry for user facing changes. When the faster integer conversion is eventually implemented, you'll be credited. |
Yes, I understand that. I'm saying that it's possible this will become a "user-facing" change soon. I already have a newer version (not yet checked in) that's much better. Mucking with labels is, IMO, a minor waste of time at this point. |
Sorry, I'm just trying to help. I thought you didn't mean in the near future. |
No problem! Things change: I originally thought this was far from being ready, but that's been changing rapidly. |
… did very much better than I recalled. So moving to that instead. The crossover point is "only" about 3.4 million digits now, far smaller.
A cute mystery: I noticed that converting a string representing an int a little smaller than a power of 256 took about 3x longer than one a little larger than that power. Turns out there's "a reason" for that: in the latter case, the |
Add a int<->str test for a truly large int (10 million digits), which isn't currently tested. Bur regrtest will skip it unless the "cpu" resource is enabled (e.g., via "-ucpu" on the cmdline).
Dear Lord, buildbots can be annoying 😉. It's hard to be sure of things digging through the mountains of text files they save. Best guess is the failing boxes do not build the C But most of the buildbots that failed are just sitting there, apparently doing nothing, and trying to "force" a new run just says the request is queued - but not running it. Just 3 of these buildbots appeared to wake up and actually run again after that commit. Their tests all passed. So my best guess is that the problem is fixed. But no way yet to be sure. |
Adding new, but unsued,
_dec_str_to_int_inner()
, + discussion.int(string)
#118750