On Wed, 15 Nov 2006 14:50:36 -0800, David Harvey  
<[EMAIL PROTECTED]> wrote:

>
>
> On Nov 15, 2006, at 5:00 PM, Martin Albrecht wrote:
>
>>
>> Hi there,
>>
>> I've implemented a very naive cache for finite extension field
>> elements in the
>> Givaro wrapper. Basically, all elements are created when the field
>> is created
>> and references are returned by the arithmetic methods: Thus, no
>> objects are
>> created, no malloc, nothing. The speed-up is noticeable:
>
> Ha ha that's ridiculous. If I remember correctly, givaro goes up to
> 2^16, so each element actually requires 16 bits of storage space, and
> now you're storing all possible 16 bits in an array and then
> effectively representing elements of the field as a pointer into that
> array!!! That's pretty funny.

They are Python classes, so it takes way more than 16 bits to store
each element.  He's talking about caching the Python classes not
the underlying Givaro elements (which are just ints or bigger).


William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
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