Skip to content

Avoid cache-hit workspace allocations on Julia 1.10 - #261

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/exponentialutilities-julia110-expcache
Jul 29, 2026
Merged

Avoid cache-hit workspace allocations on Julia 1.10#261
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/exponentialutilities-julia110-expcache

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jul 26, 2026

Copy link
Copy Markdown
Member

Stores the large exponential! workspace in a private concrete _ExponentialWorkspace{W} cell, rather than returning it by value from the cache. This removes the 64-byte Julia 1.10 allocation on warmed get_expcache! hits while using only ExponentialUtilities-owned APIs.

The old return-by-value path regressed at commit 3d1e43f; released e044eeb fails the Core allocation assertion on Julia LTS hosted platforms and in the downgrade job. The initial draft used non-public Base.RefValue; this update replaces it with the local cell so ExplicitImports passes.

Validation:

  • Julia 1.10 direct cache controls: concrete local cell, cache identity reuse, and zero warmed-hit allocations.
  • Julia 1.10 non-Hermitian Complex ExpvCache control: workspace reuse confirmed.
  • Julia 1.10 GROUP=Core Pkg.test(; coverage=true): 738 passed, 1 expected broken, 0 failures/errors.
  • Julia 1.10 GROUP=QA Pkg.test(; coverage=true): 19 passed, 2 expected broken, 0 failures/errors; ExplicitImports passes.
  • Runic check and git diff --check pass.

Draft — please ignore until reviewed by @ChrisRackauckas.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 29, 2026 10:27
@ChrisRackauckas
ChrisRackauckas merged commit ca8cb6b into SciML:master Jul 29, 2026
35 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