Add PrecompileTools workload to reduce TTFX#515
Merged
ChrisRackauckas merged 1 commit intoSciML:masterfrom Jan 3, 2026
Merged
Conversation
This PR adds a precompilation workload using PrecompileTools.jl to significantly reduce time-to-first-X (TTFX) for common operations. ## Changes - Added PrecompileTools as a dependency - Created `src/precompilation.jl` with workloads for: - VectorOfArray creation - DiffEqArray creation - Basic indexing operations - Broadcasting operations - Array conversions - ArrayPartition operations - recursive_mean, recursivecopy ## Performance Improvements (TTFX) | Operation | Before (ms) | After (ms) | Improvement | |-----------|------------|-----------|-------------| | VectorOfArray creation | 350 | 48 | **7.4x faster** | | Indexing operations | 289 | 0.8 | **361x faster** | | Broadcasting | 185 | 0.6 | **308x faster** | | Array conversion | 138 | 0.6 | **230x faster** | | ArrayPartition + recursive_mean | 83 | 0.7 | **119x faster** | | **Total TTFX** | **1399** | **358** | **3.9x faster** | Precompilation time increases from ~2.8s to ~4.3s, but the 1+ second savings in TTFX makes this a worthwhile tradeoff. No invalidations were detected when loading RecursiveArrayTools. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
src/precompilation.jlwith workloads for VectorOfArray, DiffEqArray, ArrayPartition, indexing, broadcasting, and array conversionsPerformance Improvements (TTFX)
Precompilation time increases from ~2.8s to ~4.3s (+54%), but the 1+ second savings in TTFX makes this a worthwhile tradeoff for users.
No invalidations were detected when loading RecursiveArrayTools.
Test plan
cc @ChrisRackauckas
🤖 Generated with Claude Code