I am a mechanical engineer with experience of software development rather than someone with a computer science degree. I have a function which is expensive to evaluate embed