MilesCranmer / DispatchDoctor.jl

The dispatch doctor prescribes type stability
Apache License 2.0
128 stars 6 forks source link

Ignore union splitting? #29

Closed ChrisRackauckas closed 3 weeks ago

ChrisRackauckas commented 4 weeks ago

Since union splitting optimized code is a bit different from a full type instability, it would probably make sense to have a way to ignore that. That would fix the iterate case and remove the special casing there.

MilesCranmer commented 4 weeks ago

I think you might be able to set this globally with:

import DispatchDoctor as DD

DD.type_instability(::Type{<:Union}) = false

Locally, though, we would need a new parameter.

MilesCranmer commented 4 weeks ago

Added in https://github.com/MilesCranmer/DispatchDoctor.jl/pull/31

MilesCranmer commented 4 weeks ago

Let me know if #31 is good and I can merge...