Skip to content

Optimize shared distance calculations #131

Closed

Description

@NiklasMelton

Scope

  • use SciPy's compiled direct-coordinate kernel for NumPy centroid distances
  • preserve the existing compiled Numba path
  • share an allocation-light off-diagonal minimum across XB, GD43, and GD53
  • vectorize GD53 dispersion matrices and large-cluster row updates

Implementation: #122

Measured change

At 4,096 samples, 8 features, and 128 clusters, batch speedups are 1.19x for DB, 1.40x for XB, 1.39x for GD43, 2.31x for GD53, and 1.32x for PS. Incremental speedups reach 3.22x for XB and 1.65x for GD53.

DB takes 2.299 ms versus scikit-learn's 6.796 ms on this workload. The DB definitions differ.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions