summaryrefslogtreecommitdiffstatshomepage
path: root/py/objint.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-07-23 01:38:19 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-07-28 21:21:59 +0300
commit645582fe14b10daa938bcabd86054ea23ea9eb08 (patch)
treef06934401f1cecdaaef02f69df0cad4314e559ce /py/objint.c
parentadf0f2ae1a3debf8465ece7e065ddba2d4032e8c (diff)
downloadmicropython-645582fe14b10daa938bcabd86054ea23ea9eb08.tar.gz
micropython-645582fe14b10daa938bcabd86054ea23ea9eb08.zip
py: Make id() return small int for the most common address space mapping.
Many OSes/CPUs have affinity to put "user" data into lower half of address space. Take advantage of that and remap such addresses into full small int range (including negative part). If address is from upper half, long int will be used. Previously, small int was returned for lower quarter of address space, and upper quarter. For 2 middle quarters, long int was used, which is clearly worse schedule than the above.
Diffstat (limited to 'py/objint.c')
0 files changed, 0 insertions, 0 deletions