Skip to content

Use copy-on-write shape and strides #170

@Ivorforce

Description

@Ivorforce

Currently, compute_case uses xt::dynamic_shape for shape and strides.
Since these often don't change for operations, it should be possible to use a CowData - like structure to hold these instead. This should reduce unnecessary allocations. For primitive shapes (like Vector2, i.e. float[2]), we can even avoid allocation altogether by using a static shared shape for construction.

I should measure the impact before endeavouring on this, but I suspect it should decrease overhead a fair bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    optimizationSomething that optimizes size, speed, or maintainability.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions