On Jan 10, 3:20 pm, Johannes <dajo.m...@web.de> wrote:
> But in the _copy_() method _mutability is set to a value.
Yes, that's the line that led me to the fixed ticket #8294.

A thing to keep in mind is that the designers of 2x2 matrices might
have been willing to give up some features (such a immutability) in
favor of efficiency. By properly setting mutability you suddenly have
a full-blown python object hanging off your matrix. The cost of its
construction and allocation can easily overshadow everything else (I
haven't timed it).

It could be more appropriate to fix this by making 2x2 matrices always
immutable (then the methods accessing that can be special-cases on the
class) or by lying and just making set_immutable a no-op.

Or perhaps by documenting "2x2 matrices aren't a full implementation
of matrices, but we inherit from it anyway by way of a hack. Don't
expect that ... will always properly work. Only use 2x2 matrices when
you need the speed and don't care about the unimplemented features".

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to