Hello and welcome to the community!
Try
struct Foo{F<:Function}
f::F
end
To make sure the field is concretely typed.
When the compiler cannot figure out the correct type at compile time you’ll typically see many additional allocations.
Hello and welcome to the community!
Try
struct Foo{F<:Function}
f::F
end
To make sure the field is concretely typed.
When the compiler cannot figure out the correct type at compile time you’ll typically see many additional allocations.