Spot on, I’ve already been through all these papers
Happy to believe you here, but at the same time I’m not knowledgeable enough in the field (yet) to go ahead and do something different from them.
I’ve already used an even less efficient matlab version of the code above, which has given “okay” results, and I posted this thread mostly because I really want to get better at julia, and understand how to eliminate those pesky allocations.
I do appreciate your advice though, and I’ll definitely do some extra research on the topic at some point!