First of all do not forget these :
- Premature optimisation is root of all evils
- Performance come from the design
Secondly;
Don't assume try and see
I think this is the cardinal rule of optimisation, test it, unless you test it and prove that it's working you wouldn't know.
In your case what I'd do is, firstly refactor the code, have grasp of it.
If you got unit tests you are lucky just go function by function and specifically go and check most frequently called code (use profiling to observe calls and where are the bottlenecks). If you don't have tests, write some basic tests which confirms the overall output in some conditions so you can ensure that you are not breaking anything and free to experiment.