| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
> Stéphane Larouche wrote: > > > they are extremely slow. > ... > > The DLLs contain a lot of mathematic functions (mainly trigonometric) > ... > > Is this a known problem? Would it be helpful if I tried to identify what part of > > the code are so slow? Do you have any suggestion of how to do it? > > No, this is not a known problem, and in fact, little performance testing > has been done so far on MinGW GCC specifically. > > Yes, it would help if you could give us an idea of what part of the code > specifically causes this problem. > > It would also be helpful if we knew what optimization flags you are > using, and what effect options like -ffast-math had on this speed > difference. I use -O3 optimization flag for my project. -ffast-math is not really an option since it does not follow IEEE standard. The additional level of verification needed to avoid problems such as division by zero would most probably overcome any speed gain. I have determined the performance of GCC 3.4.5, 4.2.1 technology preview and 4.3.0 alpha, with various optimization flags. In all cases, I have used MinGW 5.1.4 typical installation, except for the version of GCC. The results include the size of the 2 DLLs and the time it takes to run a typical operation of OpenFilters, a software of mine: GCC 3.4.5 (no flag): (321+105)kB, 71s -O1: (224+89)kB, 51s -O2: (219+92)kB, 50s -O3: (219+92)kB, 48s -ffast-math: (320+105)kB, 69s GCC 4.2.1-dw2-2 (no flag): (448+214)kB, 92s -O1: (328+203)kB, 37s -O2: (325+204)kB, 37s -O3: (327+205)kB, 36s -ffast-math: (446+213)kB, 98s GCC 4.2.1-sjlj-2 (no flag): (383+159)kB, 90s -O1: (182+150)kB, 36s -O2: (180+151)kB, 37s -O3: (181+151)kB, 36s -ffast-math: (382+159)kB, 98s GCC 4.3.0 alpha (no flag): (331+151)kB, 142s -O1: (272+138)kB, 87s -O2: (268+138)kB, 84s -O3: (269+139)kB, 82s -ffast-math: (326+150)kB, 115s As you can see, the 4.3.0 alpha version is much slower that the other ones. All three level of optimization have approximately the same effect. -ffast-math does not provide a great increase; in the case of 4.2.1, it even slows down the execution. In addition to speed and size differences, I have noticed that the results returned by the software are slightly different in the different GCC versions. Is it possible that mathematical functions do not handle floats/doubles correctly? I will try to find some time during the weekend to generate a minimal example that reproduces the problem. In the mean time, those interested can take a look at the code used to generate those results at www.polymtl.ca/larfis/English_Version/OF/OF_English.htm. Sincerely, Stéphane ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ MinGW-users mailing list MinGW-users You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
© 2004-2008 readlist.com