Skip to content

[Perf #478] LinearSVC Digits predict is slower than scikit-learn #518

Open

Description

@godofecht

Parent: #478. Found while working on #489.

In the frozen headline result at f1ed528, LinearSVC on Digits predicts in 0.176 ms on Flow against 0.107 ms on scikit-learn, a speedup of 0.61x. The estimator total is a Flow win because fit is 2.01x, so the end-to-end classification hides this operation.

The same prediction stage in the last six freezes reads 0.61x, 0.78x, 0.78x, 0.56x, 1.12x and 1.15x. It is below 1x in four of six, so it is a real gap that crosses 1x with run-to-run noise at this sub-millisecond scale.

Work: profile the prediction path (decision values for 10 classes over the test rows, argmax, output allocation) and compare the operation count and layout against the scikit-learn path. Keep the canonical accuracy and the learned weight and intercept parity.

Acceptance: Digits predict at 1.05x or better in the canonical benchmark across consecutive freezes, with no fit regression.

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