On Tuesday, March 13, 2018 at 11:14:41 AM UTC, Erik Bray wrote:
>
>
> Doesn't Sage allow creating mutable matrices? In a case like that you
> should mutate the object rather than go through expensive object
> creation over and over.
>

##
Advertising

I think the scenario would be one where the discriminant of a polynomial
gets computed by something along the lines of:
f.sylvester_matrix(f.derivative()).determinant()
(and now imagine that in a loop for various f; possibly of varying degrees)
One could optimize that by explicitly coding all the steps and that would
probably be quite fast, but that would be quite onerous. If profiling would
give that parent creation is a significant cost in this process, it would
be nice to do something about that. We'd have to see examples.
(of course, the better solution here is to compute the discriminant
directly, via a method that's faster than computing a generic determinant,
but it's a nice example of a case where a matrix is created where having
the parent initialized has no benefit).
--
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.