I am studying the coercion model in detail, looking for optimization opportunities. One source of slow-down is the use of weak references.

Over time, more and more places in Sage use weak references. But I'd like to look at the big picture and see where weak references should be used and where not.

Take coercion maps for example. The coercion model stores a weak reference to the coercion maps and the maps also store a weak reference to the domain (but not the codomain).

It's not clear to me why this double weak reference is needed, but maybe I'm missing something. It seems more logical to use strong references in the coercion map but then store a weak reference to the map.

I'd like to "fix" this with action maps first, which are conceptually simpler.


Jeroen.

--
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to