I have a compiled function(such as $f\left(z,c\right)=z^2+c$) which will get replaced by different equations as the code runs. I'm using this compiled function(#1) inside another compiled function(#2).
I don't want to recompile #2 every time #1 is changed though. I know I can just dump #1 in #2 declaration like any other function, such as Sin, and it'll work. It'll just wrap #1 in a MainEvaluate like
MainEvaluate[Hold[func1][C1]]. #1 is intended to be a listable function BTW.
I know MainEvaluate can be inefficient though, so I was wondering if I could do this more efficiently. I was thinking a dynamically updating library could do it, but I have no clue how to do that, or if that's the case. Does anyone more knowledgeable about Compile have any advice?