Skip to content

Specialize mutability on the operation - #379

Merged
blegat merged 1 commit into
mainfrom
bl/mutability_specialize
Oct 23, 2026
Merged

blegat merged 1 commit into
mainfrom
bl/mutability_specialize

Conversation

@blegat

@blegat blegat commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

op is only passed to promote_operation so Julia did not specialize on it and compiled promote_operation(::Function, ...) with a runtime dispatch. Any new promote_operation method with generic argument types then invalidated it.
This removes the need for JuliaAlgebra/StarAlgebras.jl#144 which showed we would get many of these so we needed to find the root of the issue which this PR fixes.

`op` is only passed to `promote_operation` so Julia did not specialize on it
and compiled `promote_operation(::Function, ...)` with a runtime dispatch.
Any new `promote_operation` method with generic argument types then
invalidated it.
@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@366f688). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #379   +/-   ##
=======================================
  Coverage        ?   92.04%           
=======================================
  Files           ?       23           
  Lines           ?     2375           
  Branches        ?        0           
=======================================
  Hits            ?     2186           
  Misses          ?      189           
  Partials        ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@blegat
blegat force-pushed the bl/mutability_specialize branch from 7224bf6 to dccca54 Compare October 23, 2026 19:13
@blegat
blegat merged commit 997f155 into main Oct 23, 2026
13 checks passed
@blegat
blegat deleted the bl/mutability_specialize branch October 23, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant