8000 gh-129149: Add fast path for medium-size integers in `PyLong_FromSsize_t()` by chris-eibl · Pull Request #129301 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-129149: Add fast path for medium-size integers in PyLong_FromSsize_t() #129301

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

Merged
merged 13 commits into from
Mar 13, 2025
Merged
Prev Previous commit
Next Next commit
Address Sergey's review
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
  • Loading branch information
chris-eibl and skirpichev authored Jan 26, 2025
commit ed04f4a538386cdf9562935874a4a5781fb40e59
3 changes: 0 additions & 3 deletions Objects/longobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,6 @@ _PyLong_Negate(PyLongObject **x_p)

#define PYLONG_FROM_INT(UINT_TYPE, INT_TYPE, ival) \
do { \
PyLongObject *v; \
UINT_TYPE abs_ival, t; \
int ndigits; \
/* Handle small and medium cases. */ \
if (IS_SMALL_INT(ival)) { \
return get_small_int((sdigit)ival); \
Expand Down
Loading
0