lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copy alist instead of deep copy on Grob clone (issue 561640045 by ad


From: hanwenn
Subject: Re: Copy alist instead of deep copy on Grob clone (issue 561640045 by address@hidden)
Date: Tue, 14 Apr 2020 00:24:10 -0700

On 2020/04/14 07:00:56, hahnjo wrote:
> On 2020/04/13 21:01:11, hanwenn wrote:
> > it's hard to say if this makes a measurable difference:
> > 
> > [...]
> 
> So then ... why do it at all? From a code perspective, a deep copy
looks saner
> in terms of "encapsulation" (one principle of object-oriented
programming). If
> there is no provable gain, I'm for leaving the current code alone
until there is
> good reason to change - "premature optimization is the root of all
evil"

As I described in the commit message, this code doesn't protect
anything, because get_property can also return values from the immutable
list.

Due to timing variability, we can't quantify performance changes below
1% of impact, but if we add 10 of them in a row, we do get measurable
impact. 

For the Mutable_properties change, we saw seemingly consistent
performance differences, which we could tease apart from deep copy
change by separating out the commit.


https://codereview.appspot.com/561640045/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]