Skip to content

WIP: Inline optimized any/all for ArrayPartition on Julia 1.13+#1

Draft
ChrisRackauckas-Claude wants to merge 1 commit intoabstractarray-breaking-updatefrom
cr/inline-anyall-1.13
Draft

WIP: Inline optimized any/all for ArrayPartition on Julia 1.13+#1
ChrisRackauckas-Claude wants to merge 1 commit intoabstractarray-breaking-updatefrom
cr/inline-anyall-1.13

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Owner

Summary

Julia 1.13 (JuliaLang/julia#61184) removes the f::Function restriction from any/all, so defining any(f, ::ArrayPartition) drops invalidations from ~780 to 1 (verified with SnoopCompileCore).

On 1.13+, the optimized partition-level methods are defined directly in the main package via @static if VERSION >= v"1.13.0-DEV.0". On older Julia, the RecursiveArrayToolsArrayPartitionAnyAll subpackage split is preserved.

Invalidation measurements

Julia Method Invalidated MethodInstances
1.12 (without this PR) Base AbstractArray fallback 1
1.12 (with inlined methods) any/all on ArrayPartition 783
1.13+ (with inlined methods) any/all on ArrayPartition 1

Depends on

🤖 Generated with Claude Code

Julia 1.13 (JuliaLang/julia#61184) removes the f::Function restriction
from any/all, so defining any(f, ::ArrayPartition) drops invalidations
from ~780 to 1 (verified with SnoopCompileCore).

On 1.13+, the optimized partition-level methods are defined directly in
the main package. On older Julia, the subpackage split is preserved.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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