Skip to content

<valarray>: Consider replacing size() calls with _Mysize #3915

Description

Followup issue after discussion in #3911, to improve debug codegen for a minor editing cost.

As Alex Guteniev (@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 of size() 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedSomething works now, yay!performanceMust go faster

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions