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.

But I can see why it would be faster, given all the crap that sits  
between us and those 16 bits.

I don't necessarily have a problem with what you're doing, but in the  
long run, we're better off just bloody well implementing the fields  
ourselves. I'll put it somewhere on my to-do list.... (hmmm.... maybe  
I would get things done faster if I represented tasks as pointers  
into my to-do list....)

David


--~--~---------~--~----~------------~-------~--~----~
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