clad
clad copied to clipboard
VisitCallExpr allways has to visit all the call arguments before the suitable derivative is found.
https://github.com/vgvassilev/clad/blob/953fe26d5ca3d19adbcb0a0f40369d90bd136d0b/lib/Differentiator/DerivativeBuilder.cpp#L487
This is inefficient if no derivative for the callee exist. It can potentially lead to errors since it is likely that nondifferentiable function call has nondifferentiable arguments as well.