On Monday, October 27, 2014 6:24:44 PM UTC, Nils Bruin wrote:
>
> Are you sure that implementing Buchberger's algorithm would require 
> coefficients to occur as *keys*?
>

You need to put the S-polynomials in a hash table for any kind of 
reasonable performance.

I agree that this could be fixed by moving the comparison away from 
"isomorphic" and more towards "identical". That is of course always true if 
you just tighten equality enough.

Completely unrelated to padics is the issue of caching. It seems unlikely 
that a function will give the same answer on Integer(3) and GF(5)(3), but 
with caching it does. Really, once we declare them == we just can't trust 
associative containers any more since they don't have a hook to use a 
different comparison than ==. And many (most) fast algorithms depend on 
associative containers. And even worse, if you have __eq__ elements with 
different hashes as dict keys then what happens depends on an unlikely hash 
collision. And the more parent/elements with coercion rules we implement, 
the more likely is it that we trip over that.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to