[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

Ma Lin report at bugs.python.org
Sun Aug 11 20:13:09 EDT 2019


Ma Lin <malincns at 163.com> added the comment:

How about using a hybrid implementation for `int`.

For example, on 64-bit platform, if (a integer >=-9223372036854775808 and <=9223372036854775807), use a native `signed long` to represent it.

People mostly use +-* operations, maybe using native int is faster, even including the cost of overflow checking.

If operation will overflow or other operation like **, we can transform native int to current form and run in current code path.

----------
nosy: +Ma Lin

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37812>
_______________________________________


More information about the Python-bugs-list mailing list