Add allocation tests to prevent performance regressions#101
Merged
ChrisRackauckas merged 1 commit intoSciML:masterfrom Jan 12, 2026
Merged
Conversation
This adds a new test file `test/alloc_tests.jl` that verifies zero allocations for all core solver step functions. The tests verify: - SimpleTsit5 step! (OOP and IIP) - SimpleRK4 step! (OOP and IIP) - SimpleEuler step! (OOP and IIP) - SimpleATsit5 step! (OOP and IIP) The tests use @allocated to verify zero heap allocations at runtime, ensuring the high-performance characteristics of these solvers are maintained. The tests are included in the "nopre" CI group alongside the existing JET static analysis tests. 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
This PR adds allocation tests to the SimpleDiffEq.jl test suite to prevent performance regressions. After thorough profiling and benchmarking of the package, the core solvers were found to be already well-optimized with zero allocations for
step!functions.Benchmarking Results
All solvers showed zero allocations for their
step!functions:Changes
New file:
test/alloc_tests.jl: Tests that verify zero allocations for all core solverstep!functions (SimpleTsit5, SimpleRK4, SimpleEuler, SimpleATsit5) in both out-of-place (OOP with SVector) and in-place (IIP with Vector) formulations.Modified:
test/runtests.jl: Added allocation tests to the "nopre" CI group alongside JET static analysis tests.Test Plan
cc @ChrisRackauckas
🤖 Generated with Claude Code