Dnia 28-09-2007, Pt o godzinie 18:58 +0200, Victor Stinner pisze:

> I don't know GMP internals. I thaught that GMP uses an hack for small
> integers.

It does not.

(And I'm glad that it does not, because it allows for super-specialized
representation of small integers where even the space for mpz_t itself
is not allocated. An GMP-internal optimization for the same cases would
be underutilized and thus wasteful.)

> I may also use Python garbage collector for GMP memory allocations
> since GMP allows to use my own memory allocating functions.

This would make linking with another library which uses GMP impossible
(unless the allocator is compatible with malloc, reentrant etc.).
Glasgow Haskell has been unfortunate to go that way.

> GMP also has its own reference counter mechanism :-/

It does not.

-- 
   __("<         Marcin Kowalczyk
   \__/       [EMAIL PROTECTED]
    ^^     http://qrnik.knm.org.pl/~qrczak/

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to