Skip to content

Performance – Use Vector<T>& in Static Inlined Functions to Avoid Kokkos Reference Counting Overhead #225

Description

@julianlitz

Critical Performance Reminder:

Static inlined functions that accept Vector<T> by value incur significant overhead due to 'Kokkos' internal reference counting mechanism. Even though Vector<T> behaves somewhat like a pointer (it does not perform a deep copy), the reference count update on every call can make affected code paths up to 3× slower than necessary.

Fix: Change all such function signatures to accept Vector<T>&.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions