Edit it. The guy's trying to learn how to optimize math, and as usual assumes there's some tool out there (bullet-shaped, made of magic and silver) that will solve the problem for him. But what he really wants is guidance, knowledge born of experience... So make the question reflect his true desires.
Addressing concerns raised in the comments
Isn't the question still too broad and also opinion-based?
It's really not very broad. Oh, it's not trivial, but given the constraints of the problem there are relatively few practical solutions, and so far only one purely speculative answer has been posted (and isn't doing very well).
I guess it's somewhat opinion-based, but no more than usual - there are multiple approaches. The author didn't ask for everyone's favorite optimization techniques, he presented a specific class of problems that he needs to optimize.
It's a list question
The term "list question" is ill-defined; it started out as shorthand for a problematic sort of question now so reviled no one bothers to even defend it anymore. If you're curious, read Real Questions Have Answers. None of that applies to this question.
It needs benchmarks to be answerable
This isn't that type of problem. Oh, I'm sure the author will use some sort of benchmarking (and probably already has) to evaluate his progress, and a good profiler might aid him in identifying steps that are unusually costly... But in my experience, this sort of problem is rather difficult to profile accurately without careful preparation and plenty of trial and error - which may be part of an answer, but isn't a good reason to close the question.
What about Computational Science Stack Exchange?
Not a bad choice if that's where the author is coming from - indeed, there are several similar questions there already. That said, this is as much a problem for programmers tasked with implementing the work of scientists or engineers, and I'll wager programmers experienced with this work are more likely to hang out here on Stack Overflow. Heck, this was my job for a few years. Not all programmers spend their days making web pages.
This strikes me as a well-asked, specific, programming question. I see no reason to close it.