<valarray>
: Consider replacing size()
calls with _Mysize
#3915
Labels
<valarray>
: Consider replacing size()
calls with _Mysize
#3915
Followup issue after discussion in #3911, to improve debug codegen for a minor editing cost.
As @AlexGuteniev mentioned in #3911 (comment) ,
<valarray>
is currently extremely careful to extract the size to a local variable to avoid aliasing, which is important for vectorizing its following loops. When replacing calls ofsize()
with direct access to_Mysize
, the local variables should be preserved. We may even want to add comments like// avoid aliasing
as a small reminder about this somewhat unusual pattern.The text was updated successfully, but these errors were encountered: