Dnia 09-09-2007, N o godzinie 21:27 -0400, Jim Jewett napisał(a):
> If python handled small ints itself, and only farmed out the "large"
> ones,
If GMP is used, it's definitely worth to have a non-GMP representation
for small integers, because GMP itself does not do it. A GMP integer
is represented by a pointer to digits, the allocated size, and the used
size multiplied by the sign; no special cases here.
(The fact that GMP does not do it is good for people who want to make
a super-compact representation themselves. GMP optimization for the same
case would be wasted. It requires some work for implementing overflow
detection, but it yields a very good final result.)
The major technical problem with GMP is that an out of memory condition
during computation is a fatal error, GMP does not provide a way to
recover from it.
--
__("< Marcin Kowalczyk
\__/ [EMAIL PROTECTED]
^^ http://qrnik.knm.org.pl/~qrczak/
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com