Skip to content

feat: add lasso and elastic net benchmarks - #9

Merged
Mec-iS merged 1 commit into
smartcorelib:mainfrom
jolars:feat/lasso-elastic-net-benches
Oct 14, 2026
Merged

Mec-iS merged 1 commit into
smartcorelib:mainfrom
jolars:feat/lasso-elastic-net-benches

Conversation

@jolars

@jolars jolars commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

This repo has no Lasso or Elastic Net benchmarks to compare the fit changes in smartcorelib/smartcore#480. This PR adds benchmarks for both estimators and instructions to compare eager and lazy normalization with a local smartcore checkout.

The Criterion benchmarks use fixed f64 data at four sizes: 1,024 × 32, 8,192 × 32, 65,536 × 32, and 1,024 × 128. Each size runs with row-major and column-major DenseMatrix inputs and a row-major ndarray input. Data creation occurs outside the timed loop. Both estimators use normalization and the same solver settings across runs.

The iai-callgrind benchmarks add three cases per estimator: normalized fits in both dense layouts and a row-major fit without normalization. Setup occurs outside the instruction count. Both CI jobs include the new benchmarks and continue to use the published smartcore release.

The regularized_fit example fits one model per process for peak-memory measurements with GNU time. The README explains how to run these measurements and save an eager Criterion baseline for comparison with a lazy build.

Validation:

  • cargo bench --no-run
  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • All 24 Criterion cases passed in --test mode with smartcore 0.6.15 and with the local PR checkout at aaa79c9, both with and without smartcore/lazy-normalization.
  • All six iai-callgrind cases ran under Valgrind. The history converter produced six entries with unique names.
  • The memory example ran for both estimators with the published release and the local lazy build.

@Mec-iS
Mec-iS merged commit 4a1e77c into smartcorelib:main Oct 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants