If your algorithms are inefficient, it's going to make no difference what language you use. Just re-write the performance-critical parts of your application. No languages are slow at basic maths; unless they're interpreted, and badly, at that.