Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link
Contributor

Summary

This PR adds a PrecompileTools workload that precompiles the most common code paths for operator splitting problems.

Performance improvements:

  • TTFX init: 4.05s → 2.51s (~38% reduction)
  • TTFX solve: 1.81s → 1.44s (~20% reduction)
  • TTFX total: 5.86s → 3.94s (~33% reduction)
  • Package load time: 1.22s → 1.27s (slight increase from loading precompiled code)

Changes

  • Added PrecompileTools and OrdinaryDiffEqLowOrderRK as dependencies
  • Created src/precompilation.jl with a minimal workload that exercises:
    • GenericSplitFunction creation
    • OperatorSplittingProblem construction
    • LieTrotterGodunov with Euler integrators
    • init, step!, and solve! operations

Invalidation Analysis

Checked for invalidations using SnoopCompile. Found 76 invalidation trees with 3,741 total invalidated method instances, but these are from upstream dependencies (Static.jl, RecursiveArrayTools, SciMLBase, FillArrays, CommonWorldInvalidations) and not from this package.

Test plan

  • Run Pkg.test() to verify all tests pass
  • Verify TTFX improvements in fresh Julia session
  • CI tests pass

🤖 Generated with Claude Code

cc @ChrisRackauckas

This adds a PrecompileTools workload that precompiles the most common
code paths for operator splitting problems using LieTrotterGodunov with
Euler integrators.

Performance improvements:
- TTFX init: 4.05s -> 2.51s (~38% reduction)
- TTFX solve: 1.81s -> 1.44s (~20% reduction)
- TTFX total: 5.86s -> 3.94s (~33% reduction)

Changes:
- Added PrecompileTools and OrdinaryDiffEqLowOrderRK as dependencies
- Created src/precompilation.jl with a minimal workload that exercises
  GenericSplitFunction, OperatorSplittingProblem, and LieTrotterGodunov
  with Euler integrators

The package load time increases slightly (~1.22s -> 1.27s) due to
loading the precompiled code, but this is more than offset by the
significant TTFX improvements.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@ChrisRackauckas-Claude ChrisRackauckas-Claude force-pushed the precompile-improvements-20260107-154605 branch from 85d05a7 to 1d1b2b8 Compare January 8, 2026 16:10
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