From: Douglas Vechinski <douglas.vechinski@dy...>  20060320 15:36:24

> >On 2006317 14:38 UTC, Douglas Vechinski wrote: > > >>Can a subroutine call add that much overhead. Yes I understand that >>there is some overhead, but certainly it seems to me that the >>calculation of a trig function is alot more time consuming than such >>overhead. >> >> > >Educated guesses may lead us astray, and measurements may prove >things that seem surprising. > > > >>This example with the trig functions was just a small one I put together >>so other people could test. If I were to use a Gaussian elimination >>code to solve a large matrix i would get comparable results that Cases >>C and D are much slower than any of the others. This would not involve >>any complex trig function just straight forward adding and >>multiplaction. >> >> > >In that case, significant speed differences could still arise >from different settings in the floatingpoint control word, >or perhaps from some compilers using SSE instructions. > > I did some further testing and have to take back my assertion about codes in general running slower. I was stating from some results from sometime ago and did not remember at the time that this code also contained complex math functions. I reran the various platform/OS combinations/compilations as I stated in my original message, but this time used a matrix solution solver to solve a random 3000 x 3000 matrix. The same matrix was read in from a file for all runs. This code is just doing adds, subtracts, multiplies, and divides and some fabs calls. (In short, a Gaussian elimination with scaled partial pivoting routine). In short, the times for all the gcc compilations using the same options across the different environments were very comparable. There were also dramatic improvments with the different compilation options. The MS code was about 20% faster for the Debug version and about 13% slower on the Release version. ( I can report the times if someone is interested). Anyway, the executables were running very similarly to one another. My previous example was mostly involved complex math functions and as do the research codes I am normally generating. So, this suggests that there is a huge speed difference with the math functions used when compiled with Cygwin mnocygwin and Msys/Mingw as compared with Linux, .Net or native Cygwin. Are the Msys/Mingw executables using a different library for the math functions than does .Net? Anyone with any insight as to why the math functions when native windows executable is compiled with gcc are so much slower than all the other platforms. 