You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing fast path in PyLong_From*() functions for compact integers #129149
Maybe then implement PyLong_FromSsize_t(), PyLong_FromLong() and PyLong_FromLongLong()) using a macro similar to PYLONG_FROM_UINT to get rid of the repetitive code?
PYLONG_FROM_UINT is missing the fast path for medium values, too.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
changed the title [-]PyLong_FromSsize_t(), PyLong_FromUnsignedLong(), PyLong_FromUnsignedLong() and PyLong_FromSize_t() miss the fast path for compact integers[/-][+]Missing fast path in PyLong_From*() functions for compact integers[/+]on Jan 21, 2025
PyLong_FromInt32(), PyLong_FromUInt32(), PyLong_FromInt64 and PyLong_FromUInt64() could maybe use these macros, too.
They do "the same thing" in a totally different way ...
PR is here #131211, and would also give us some nicely speed ups.
Activity
[-]PyLong_FromSsize_t(), PyLong_FromUnsignedLong(), PyLong_FromUnsignedLong() and PyLong_FromSize_t() miss the fast path for compact integers[/-][+]Missing fast path in PyLong_From*() functions for compact integers[/+]chris-eibl commentedon Jan 21, 2025
PyLong_FromInt32(),PyLong_FromUInt32(),PyLong_FromInt64andPyLong_FromUInt64()could maybe use these macros, too.They do "the same thing" in a totally different way ...
PR is here #131211, and would also give us some nicely speed ups.
gh-129149: Add fast path in PYLONG_FROM_UINT macro for compact intege…
pythongh-129149: add macro PYLONG_FROM_INT
Merge branch 'main' into pythongh-129149
Merge branch 'main' into pythongh-129149
Merge branch 'main' into pythongh-129149
Merge branch 'main' into pythongh-129149
gh-129149: Add fast path for medium-sized integers in `PyLong_FromSsi…
pythongh-129149: Add fast path for medium-sized integers in `PyLong_F…
GH-129149: Add fast path for medium-sized integers in `PyLong_From*` …