Not sure what’s going wrong then. Are there still allocations? Is the output type of collisiontime
type-stable under all types contained in TUP and is it equal to T
? How long are your tuples (at some point it will be better to loop)?
For debugging, I would hand-translate the quoted code for an example of a small tuple and see whether this performs as expected and has the right @code_warntype
output.
Also, another thing you can look at is how Unrolled.jl does it by expanding their macro-call.
Last you could try lispy recursion instead of a generated function, e.g.: 0.6: how do you broadcast `call` over a vector of functions? - #12 by andyferris
For more help from my side I need a MWE.