A few months ago there was a discussion [1] about changing Python's long integer type to use base 2**30 instead of base 2**15. http://bugs.python.org/issue4258 was opened for this. With much help from many people (but especially Antoine and Victor), I've finally managed to put together an essentially finished patch for this (see 30bit_longdigit14.patch in the tracker). I'd like to get this in for 3.1. Any objections or comments? Is this PEP territory? Summary of the patch: * Apart from improved performance, the effects should be almost entirely invisible to users. * By default, 30-bit digits are used only when both 32-bit and 64-bit integer types are available; otherwise the code falls back to the usual 15-bit digits. For Unix, there's a configure option --enable-big-digits that overrides this default. In particular, you can use --disable-big-digits to force 15-bit digit longs. * There's a new structseq sys.int_info that looks like this: >>> sys.int_info sys.int_info(bits_per_digit=30, sizeof_digit=4) the sizeof_digit is mostly there to help out the sys.getsizeof tests in test_sys. * Benchmarks show significant speedups (20% and more) for integer arithmetic on 64-bit systems, and lesser speedups on 32-bit systems. Operations with single-digit integers aren't affected much either way; most of the benefit seems to be for operations with small multi-digit integers. * There are more performance improvements planned (see the issue discussion for details); I left them out of the current patch for simplicity, and because they still need proper testing and benchmarking. Mark [1] http://mail.python.org/pipermail/python-dev/2008-November/083315.html
Use the upload.py script (/static/upload.py) rather than the Create Issue page. On Tue, Feb 17, 2009 at 12:36 PM, Mark Dickinson <dickinsm@gmail.com> wrote:
On Tue, Feb 17, 2009 at 7:49 PM, "Martin v. Löwis" <martin@v.loewis.de> wrote:
Can you please upload it to Rietveld also?
Will do. I'm getting a "500 Server Error" at the moment, but I'll keep trying.
Mark _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
On Tue, Feb 17, 2009 at 8:42 PM, Guido van Rossum <guido@python.org> wrote:
Use the upload.py script (/static/upload.py) rather than the Create Issue page.
Thanks. That worked. http://codereview.appspot.com/14105
participants (3)
-
"Martin v. Löwis"
-
Guido van Rossum
-
Mark Dickinson