I mean, math is not necessarily efficient at all. That's why there's a whole sub-field of computer science dedicated to numerical analysis.
For example, all will be in agreement that the Schrodinger equation is math. However, as of today, there's no uniquely most-efficient algorithm to find it's solutions and observables of interest. In fact it's an NP-hard problem, incredibly costly to solve. There are many workarounds, methods and approximations, which work well under certain limits (perturbation theory, markovian approachs, tensor networks and neural networks as a whole, density functional theory, and many many more), but all have their drawbacks. There's no one-trick pony. Just because math is formalized and rigorous, it doesn't mean it's calculations are efficient.
See for example the 3SUM problem, which is an open problem where we'd like to construct an algorithm to find if a given set of n real numbers contains three elements that sum to zero. It's trivial to solve in O(n\^3) time (loop three times in the array and be done with it), a little more difficult to solve in O(n\^2) time by the means of a binary search but absolutely non-trivial to solve in O(n\^(2-\\epsilon)) time.