However, I noticed that this vectorized version slightly increases the solution time. I would like to ask:
Is there any practical advantage to using the loop form over the matrix form (or vice versa) in terms of numerical efficiency or solver interface performance?
In your experience, is it recommended to avoid such vectorized forms even if they make the code cleaner?
Thank you very much for your insights and for maintaining such an excellent toolbox.
Best regards,
Yize Liu