Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link
Contributor

Summary

  • Add PrecompileTools.jl dependency and precompilation workload
  • Precompile commonly used code paths in bench_footer function
  • Reduces time-to-first-execution (TTFX) for bench_footer by ~49%

Performance Measurements

Metric Before After Improvement
Startup time 1.2s 1.2s No change
TTFX bench_footer 9.3s 4.7s 49% faster
Precompile time N/A 11s (one-time cost)

What's Precompiled

The @compile_workload block precompiles:

  • Markdown literal (md"""...""") parsing and display
  • Markdown.parse() operations
  • InteractiveUtils.versioninfo output
  • Pkg.status operations (project and manifest)

These are the main operations used in bench_footer, which is called at the end of every benchmark.

Test plan

  • Package loads correctly
  • bench_footer works correctly
  • Basic functionality tests pass

Note: The existing weave_file test fails due to a pre-existing IJulia build issue unrelated to these changes.

cc @ChrisRackauckas

🤖 Generated with Claude Code

This PR adds a precompilation workload using PrecompileTools.jl to
improve the time-to-first-execution (TTFX) for the commonly used
`bench_footer` function.

Changes:
- Add PrecompileTools as a dependency
- Add @compile_workload block that precompiles:
  - Markdown parsing and display operations
  - InteractiveUtils.versioninfo
  - Pkg.status operations

Performance improvements:
- TTFX for bench_footer: ~9.3s → ~4.7s (49% reduction)
- Startup time unchanged at ~1.2s

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@ChrisRackauckas ChrisRackauckas merged commit 35fb13c into SciML:master Dec 29, 2025
1 of 2 checks 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