Alright, so this is a 'just wondering' type of thing that I just stumbled upon, and it's oh-so small.
Typically when you're adding to a list at the command of a user, for example clicking on an object, you'll want to use the |= operator to assure that more than one of a specific object wouldn't be added to the list.
However, the client screen list works differently. Regardless of whether you use the |= operator it appears that it only ever will add a single object once.
That said, under the hood, is it more efficient to just use += always for adding things to the client screen and force it to perform the check itself, or to use the |= operator and do that part for it?
ID:2384619
Jul 15 2018, 1:38 pm
|
|
To the question, += is faster than |=, but probably not enough to really worry about it.