Skip to content

A PrecompileTools workload for the estimators - #11

Merged
mlakolar merged 1 commit into
masterfrom
precompile-workload
Oct 24, 2026
Merged

mlakolar merged 1 commit into
masterfrom
precompile-workload

Conversation

@mlakolar

Copy link
Copy Markdown
Owner

src/precompile.jl adds a PrecompileTools workload, in Float64 on a small problem (p = 5, n = 300). It covers estimate with SymmetricNormal, AsymmetricNormal, SeparateNormal and ReducedNormal, and bootstrap with simulCIstudentized. The calls of ProximalSolvers, CovarianceSelection and ProximalBase that they make are cached with them.

Measurements

Fresh processes on the Mac (M3 Pro), with each call evaluated at top level after using DiffPrecTest; p = 8, n = 400, entry (3, 2). First call, in seconds:

first call 1.13 master 1.13 this PR 1.10 master 1.10 this PR
SymmetricNormal 1.381 0.004 1.005 0.004
AsymmetricNormal 1.550 0.002 1.107 0.002
SeparateNormal 0.410 0.000 0.279 0.000
ReducedNormal 0.859 0.020 0.562 0.006
bootstrap, simulCIstudentized 1.239 0.049 0.985 0.056

Costs:

  • Load time: using DiffPrecTest takes the same time as on master on 1.13 (median 0.46 s) and about 20 ms more on 1.10 (0.38 s against 0.36 s).
  • Precompilation: 3.5 s instead of 0.9 s on 1.13, and 3.2 s instead of 0.8 s on 1.10.

The other dependencies are unregistered masters, so these measurements took ProximalBase, ProximalSolvers and CovarianceSelection from their masters. The PrecompileTools workloads of ProximalSolvers (mlakolar/ProximalSolvers.jl#44, merged) and CoordinateDescent (mlakolar/HighDimensionalModels.jl#47) come separately.

PrecompileTools' preference precompile_workload = false skips the workload; the compat is "1", since 1.3 does not install on Julia 1.10.

Tests

Pkg.test() with --depwarn=error passes all 20172 tests:

  • on Julia 1.13.2 through [sources];
  • on 1.10 from a clean copy with the three masters added by URL, as CI does.

🤖 Generated with Claude Code

The first estimate of each kind compiled the whole three-stage estimator:
0.3 to 1.6 s for SymmetricNormal, AsymmetricNormal, SeparateNormal,
ReducedNormal and the bootstrap. src/precompile.jl compiles them, in Float64,
into the package image. In fresh processes their first calls take 0 to 56 ms on
Julia 1.13 and 1.10; `using DiffPrecTest` takes as long as before on 1.13 and
about 20 ms more on 1.10, and precompilation 3.5 s instead of 0.9 s.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codecov

codecov Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.62%. Comparing base (035415e) to head (221fcdd).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #11      +/-   ##
==========================================
+ Coverage   98.45%   98.62%   +0.16%     
==========================================
  Files          12       13       +1     
  Lines        1294     1306      +12     
==========================================
+ Hits         1274     1288      +14     
+ Misses         20       18       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mlakolar
mlakolar merged commit d7eef6d into master Oct 24, 2026
6 checks passed
@mlakolar
mlakolar deleted the precompile-workload branch October 25, 2026 16:01
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.

1 participant