Help speed up the function

What you have posted is not a function.

Please provide a self-contained MWE.

2 Likes