Message404746
Looking at issue #35037 (which is a compatibility issue having to do with PYLONG_BITS_IN_DIGIT), I'm wondering whether it would make sense to drop support for 15-bit PyLong digits altogether. This would simplify some of the code, eliminate a configuration option, and eliminate the scope for ABI mismatches like that occurring in #35037.
There were a couple of reasons that we kept support for 15-bit digits when 30-bit digits were introduced, back in #4258.
- At the time, we wanted to use `long long` for the `twodigits` type with 30-bit digits, and we couldn't guarantee that all platforms we cared about would have `long long` or another 64-bit integer type available.
- It wasn't clear whether there were systems where using 30-bit digits in place of 15-bit digits might cause a performance regression.
Now that we can safely rely on C99 support on all platforms we care about, the existence of a 64-bit integer type isn't an issue (and indeed, we already rely on the existence of such a type in dtoa.c and elsewhere in the codebase).
As to performance, I doubt that there are still platforms where using 15-bit digits gives a performance advantage, but I admit I haven't checked. |
|
Date |
User |
Action |
Args |
2021-10-22 10:21:47 | mark.dickinson | set | recipients:
+ mark.dickinson |
2021-10-22 10:21:47 | mark.dickinson | set | messageid: <1634898107.47.0.88725686674.issue45569@roundup.psfhosted.org> |
2021-10-22 10:21:47 | mark.dickinson | link | issue45569 messages |
2021-10-22 10:21:47 | mark.dickinson | create | |
|