Conversation
Contributor
Author
|
The criterion bench ( |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #469 +/- ##
==========================================
- Coverage 76.95% 76.67% -0.29%
==========================================
Files 105 106 +1
Lines 7612 7635 +23
==========================================
- Hits 5858 5854 -4
- Misses 1754 1781 +27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mtantaoui
force-pushed
the
perf/elasticnet-contiguous
branch
from
November 23, 2026 16:22
98d2224 to
72c867f
Compare
mtantaoui
force-pushed
the
perf/elasticnet-contiguous
branch
from
November 23, 2026 16:41
72c867f to
6cedd14
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Speed up elastic net fitting
Fits are 3–31× faster, with the same number of passes and the same results.
Changes
it as a column of a row-major
x, with a stride of a full row, three times perupdate. It now runs on a feature-major copy of
x(none ifxis alreadycolumn-major), so
dotandscaled_addrun on contiguous data.x_jᵀ(r + w_old x_j) = x_jᵀ r + w_old ‖x_j‖²; skipped when the coefficient doesn'tchange.
dotandscaled_addper task instead of two small matrix products.xᵀ r.Every bench fit takes exactly as many passes as before, and the final duality gaps
match (f64: to 11–12 digits).
Results
cargo bench -p linfa-elasticnet --bench fit(new): default settings, penalty 0.1,n = 5 000, correlated features (ρ = 0.8), 4 tasks for multi-task. Core Ultra 7 155H,
one core.