I have a program that uses alot of vectors. I have tried optimizing it at levels -O and -O2. The performance is much better at -O2. But the results the program gives are different. I have a test harness of about 150 tests that I have run berfore and after the optimization. Maybe the optimization is causing a problem with some of the floating point calculations. Does anyone know which flags in particular in -O2 may help improve the performance of the vectors?? I am using g++ version 3.4.2
Thanks
Mark