Trait dispatch causing allocations

I think you are reaching the cases where run time dispatch is kicking in. This kind of stuff is discussed in this thread and other ones linked there, and I don’t think there is an ideal solution.

1 Like