[issue37907] speed-up PyLong_As*() for large longs

2022-03-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue37907] speed-up PyLong_As*() for large longs

2022-03-14 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue37907] speed-up PyLong_As*() for large longs

2022-03-13 Thread Jeremiah Gabriel Pascual
Jeremiah Gabriel Pascual added the comment: New benchmarks with the new changes: PyLong_AsSsize_t: Mean +- std dev: [orig] 10.3 us +- 0.6 us -> [modif] 9.03 us +- 0.61 us: 1.14x faster PyLong_AsSize_t: Mean +- std dev: [orig] 10.5 us +- 2.4 us -> [modif] 9.26 us +- 0.17 us: 1.13x faster PyLo

[issue37907] speed-up PyLong_As*() for large longs

2022-03-13 Thread Jeremiah Gabriel Pascual
Jeremiah Gabriel Pascual added the comment: Revisiting this 2+ year-old bug report, can I create another PR that implements the old PR's comments' suggestions? -- nosy: +Crowthebird ___ Python tracker _

[issue37907] speed-up PyLong_As*() for large longs

2019-08-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue37907] speed-up PyLong_As*() for large longs

2019-08-22 Thread Ma Lin
Change by Ma Lin : -- nosy: +Ma Lin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue37907] speed-up PyLong_As*() for large longs

2019-08-21 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +15074 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15363 ___ Python tracker ___

[issue37907] speed-up PyLong_As*() for large longs

2019-08-21 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : PyLong_As*() functions computes result for large longs like this: size_t x, prev; x = 0; while (--i >= 0) { prev = x; x = (x << PyLong_SHIFT) | v->ob_digit[i]; if ((x >> PyLong_SHIFT) != prev) { *overflow = sign; goto exit; }