On Mon, Jun 22, 2015 at 1:40 PM, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote:
> Hello,
>
> for about 2 weeks in the history in Sage (8 years ago), Sage had optimized
> in-place operations. Essentially, if you did
>
> A += B
>
> then this might actually *mutate* the object A in-place if the refcount of A
> was low enough such that we knew that no other pointers to A existed. See
> #624.
>
> This gave impressive speed improvements, but it broke stuff (in numpy in
> particular), so it was disabled in #1038. Essentially, the problem is that,
> in C code (maybe also Cython?), we cannot count on the refcount of an object
> to determine how many pointers it has.
>
> Currently in Sage, there are still some hooks in the coercion framework for
> these disabled in-place operations.
>
> There is a ticket #1069 to revive this functionality, but it hasn't shown
> any activity at all in 8 years. Since I also don't see how we could deal
> with in-place operations in a safe way,

What about something explicit, e.g.,

   A.add_inplace(B)

which would mutate A and be very clear and explicit.   I actually
expected something like that to exist, but found it doesn't.

> I propose to close that ticket as
> "wontfix" and instead remove the parts of Sage which still refer to these
> in-place operations.

+1

> I am interested to hear any objections...
>
> 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 http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William (http://wstein.org)

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