Closed jwscook closed 1 year ago
I'm wary of adding a hack like this if there's not a clear understanding of why it works…
Is the problem here simply a lack of specialization on function arguments, that could be fixed by changing f
to f::F
and adding where {F}
?
Yep - that's the one. See #45.
I was just investigating a performance problem with my code, which led me to investigate
HCubature.jl
. I made some small changes to pull out the first call,FirstEval
, in front ofhcubature_
to make a function barrier, which I think has helped enable Julia to compile better code(?). Either way, it looks like it's improved the allocations and timings on my machine onVersion 1.8.3-pre.0
, but it's definitely worth confirming that this improvement is not anomalous.This branch:
On master v1.5.0: