Function inside struct allocates when referenced

Function is an abstract type, and you may need to parameterize your struct to avoid allocations

8 Likes