Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Sep 6, 2019

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 rhettinger merged commit 6b51998 into python:master Sep 6, 2019
@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
Copy link
Member

This change introduced a regression: https://bugs.python.org/issue38205 Python no longer builds without small integer singletons :-(

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants