◐ Shell
clean mode source ↗

bpo-38015: replace inline function `is_small_int` with a macro version · Pull Request #15710 · python/cpython

Conversation

@ghost

There is an unnecessary type casting (to long long), may slightly reduce performance:

static inline int
is_small_int(long long ival)
{
    return -NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS;
}

https://bugs.python.org/issue38015

There is an unnecessary type casting (to long long), may slightly reduce performance:

static inline int
is_small_int(long long ival)
{
    return -NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS;
}

rhettinger

@ghost ghost deleted the small_int_macro branch

September 6, 2019 06:02

lisroach pushed a commit to lisroach/cpython that referenced this pull request

Sep 10, 2019

@vstinner

DinoV pushed a commit to DinoV/cpython that referenced this pull request

Jan 14, 2020

websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request

Jul 20, 2020