[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers.
Mark Dickinson
report at bugs.python.org
Tue Feb 17 21:30:58 CET 2009
Mark Dickinson <dickinsm at gmail.com> added the comment:
> unsigned long long m(unsigned long long a, unsigned long b)
> {
> return a*b;
> }
I think that's doing a 32 x 64 -> 64 multiplication; what's being used is
more like this:
unsigned long long m(unsigned long a, unsigned long b)
{
return (unsigned long long)a*b;
}
which gcc -O3 compiles to:
pushl %ebp
movl %esp, %ebp
movl 12(%ebp), %eax
mull 8(%ebp)
leave
ret
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4258>
_______________________________________
More information about the Python-bugs-list
mailing list