On Thu, 16 Nov 2006 10:12:13 -0800, Martin Albrecht  
<[EMAIL PROTECTED]> wrote:

>
>> NO!!  I'm referring to the full 24 byte Python object!  Most users are
>> going to just create Python objects that wrap Givaro elements.  Without
>> caching, every single one takes 24 bytes.  With caching, every one takes
>> only 4 bytes (+initial table), since all one is doing is storing a  
>> pointer.
>> I.e., if I do
>>
>>      k = Cached Givaro Field
>>      l = Non-cached Givaro field
>>
>>      v = [k.0^3 for _ in xrange(10^6)]
>>      w = [l.0^3 for _ in xrange(10^6)]
>>
>> then w will use 6 times as much space as v.
>>
>> william
>>
>
> Ahh, it's about: after the cache any new element is only a pointer.  I  
> was
> sent off by the  "64-bit machine" and was assuming something involving
> sizeof(int).
>
> OT: Aren't pointers on 64-bit machines supposed to be 64-bit?

Yes.  The above example is on a 32-bit machine (my laptop).

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to