Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

[QIR] Alias management on arrays can have major perf impact #975

Open
@swernli

Description

@swernli

Whenever an array in QIR is set to a new variable, the alias counts on each item have to be incremented for the new alias and later decremented if the previous variable goes out of scope. This can also happen when returning an array from a callable, such that the return results in a loop over each element decrementing alias count and then the caller will have a loop over every element incrementing the alias count when capturing the returned value in a variable. In some testing, we have algorithms where list sizes can get very large (up to 500k), and the repeated looping over the elements for alias count management noticeably impacts perf as the array is passed around. We should investigate a way to optimize alias and reference counting for contained items to avoid having to scale by array size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions