Test 15-bit digit case for PyLong's in CI? #138336
Copy link
Copy link
Closed as not planned
Labels
infraCI, GitHub Actions, buildbots, Dependabot, etc.CI, GitHub Actions, buildbots, Dependabot, etc.testsTests in the Lib/test dirTests in the Lib/test dirtype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
It seems, all CI jobs run tests with --enable-big-digits=30 configure option (i.e. default). Other possible case (=15 bits) is not tested. Maybe there is some build bot, but it's not obvious which one ;-)
See #30306 (comment) Nowadays I don't see Gentoo bots and it seems that "Github Actions: Test / Windows (x86)" is using 30-bit digits, e.g. https://github.com/python/cpython/actions/runs/17363314372/job/49286316737. See #138496 (tests actions and build bots)
From prior discussion in #89732 it seems that 15-bit case does make sense for 32-bit machines, but it's not the situation right now: 30-bit is unconditional default.
Lets at least test this case in Github Actions, if it's supported!
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
infraCI, GitHub Actions, buildbots, Dependabot, etc.CI, GitHub Actions, buildbots, Dependabot, etc.testsTests in the Lib/test dirTests in the Lib/test dirtype-featureA feature request or enhancementA feature request or enhancement
Activity
[-]Test 15-bit digit case for PyLong's with regular CI tests?[/-][+]Test 15-bit digit case for PyLong's in CI?[/+]pythongh-138336: find build bots, testing 15-bit case for PyLong's
vstinner commentedon Sep 4, 2025
Maybe it's not worth it to waste CI resources on testing a configuration which is used by nobody.
That's something else. Do you want to use 15-bit digit on 32-bit machines?
skirpichev commentedon Sep 4, 2025
If so, why keep this configuration supported at all?
Personally I have no 32-bit machines around :-) (Well, not something that I can back to life quickly...)
Maybe nowadays this case is exotic enough to drop it?skirpichev commentedon Sep 7, 2025
It looks for me, that merged #30497 rather contradicts to outcome of discussion in #89732.
CC @mdickinson, @markshannon
vstinner commentedon Sep 8, 2025
python.org still provides 32-bit installer for Python on Windows, even if 64-bit is now recommended.
gpshead commentedon Sep 14, 2025
A buildbot with
--enable-big-digits=15would be a good idea.While 15-bit digits could still be useful on non-x86 32-bit platforms that lack a 64-bit multiply accumulator such as 32-bit raspbian aarch32 userland, 32-bit raspbian does not build their python that way (it uses the default 30bit ints; i just checked the distro's 3.11 sys.int_info on my buildbot). It is still worth keeping support for fewer digits around so long as things like #101291 might desire to have less than 30 on 32-bit platforms in the future though.
skirpichev commentedon Sep 15, 2025
Well, if we are sure that GH action is not a suitable choice, probably this issue should be moved to python/buildmaster-config repo.
One possible option with GH actions - conditionally skip new job, if change doesn't affect pre-selected files (longobject.c, some headers, marshal.c, perhaps something else like this).
I would guess, that after #30497 - downstreams just silently use 30-bit config. At least, I haven't found any counter-examples.
If 15-bit digits are useful - defaults should be rather system-dependent, not hard-wired.
skirpichev commentedon Oct 1, 2025
@vstinner do you agree with moving this to buildmaster-config?
vstinner commentedon Oct 1, 2025
You can open a new issue in the buildmaster-config repo to propose the idea. But should we consider changing the default option for 32-bit systems?
skirpichev commentedon Oct 3, 2025
Well, there are two opinions:
With (1) - we will definitely have 15-digits case tested in GH CI. With (2) - I don't see an appropriate platform among GH CI runners and this issue definitely make sense just for buildbots...
Maybe I should open a thread in https://discuss.python.org/c/core-dev/23 ?
PS: I would rather revive original idea of Mark (#89732). The GNU GMP case shows it's possible to live without such complications (IIUIC, "nails" option just not working for most platforms at all.)
vstinner commentedon Oct 3, 2025
Benchmarks would help to take a decision. What's the difference between 15-bit and 30-bit integers on a 32-bit machine?
I don't have access to 32-bit machines. Sometimes I build Python using
gcc -m32to build it in 32-bit mode on my 64-bit machine. But I don't think that it would be a good idea to run benchmarks on a 64-bit machine.gpshead commentedon Oct 3, 2025
not at this point. the few who care have the choice via the configure option. good enough.
FYI - on x86_64/amd64 machines compiling with -m32 and testing will not be representative, 32-bit x86 has a 64bit multiplier unit (two 32bit registers as input -> a pair of 32bit registers as output). other 32-bit architectures that tend not to have that where the performance can suffer.
vstinner commentedon Oct 14, 2025
@gpshead: What do you think of using
--enable-big-digits=15on your 32-bit buildbot builder?skirpichev commentedon Dec 13, 2025
It seems no one liked new CI job proposal. So, I'm closing this in favor of python/buildmaster-config#649.