> Given the background information Python's long implementation could > probably optimized. In 3.0 a long has 3 4-byte members (ref count, > ob_size and *ob_type) plus one to many unsigned shorts (2 bytes each) to > hold the value. If pymalloc aligns the objects at 8 byte address > boundaries wouldn't it be better and slightly faster to use unsigned > ints instead of unsigned shorts? You mean, as the digits? You would have to rewrite the entire long datatype, which is a tedious exercise. Plus, I believe you would have to make some operations 64-bit on all systems: when you multiply digits today, the product will be 32-bit. If you extend the digits, you might get 64-bit results, which will be slow on 32-bit systems (plus some 32-bit systems don't support a 64-bit integer type at all in their compilers). Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4