|
From: Douglas V. <dou...@dy...> - 2006-03-16 14:43:58
|
>Subject: Re: [Mingw-users] Really slow executables generated by Msys/Mingw > gcc >Reply-To: min...@li... > >On 2006-3-15 22:30 UTC, Douglas Vechinski wrote: > > >>My primary question is to find out why codes compiled with the >>Msys/MingW environment are so slow compared to Linux/Cygwin/MS .Net. >> >> > >Your testcase calls malloc() many times, then calls math >functions many times. I'd suggest measuring the speed of >the malloc() part separately with the various compilers >you're using, to see whether that's part of the problem. > >If it's not, then I'd suggest testing a tiny program that >calls just one of the trancendental math functions, and >comparing the object code. For instance, you might find >that one compiler calls a library function with lots of >extra steps to handle error conditions, while another >writes FSIN inline. > > > Malloc is not the problem. It is only called at the beginning to allocate the memory. The first print statement is shown right from the start. If it was accounting for the extra 40 second increase, it would certainly then be noticable. I wouldn't know enough about the assembled code to know what was going on and decipher it. I would have thought though that gcc would create similar code. |