<br>Thanks for your answer but unfortunately, it makes just the thing a bit slower:<br><br>-bash-3.00# gcc -O2 -mcpu=440fp -ffast-math ./mandelbrot.c -o ./mandelbrot && time ./mandelbrot && rm -f ./mandelbrot<br><br>real 1m17.901s<br>user 1m17.828s<br>sys 0m0.036s<br>-bash-3.00# gcc -O2 -mcpu=440 -ffast-math ./mandelbrot.c -o ./mandelbrot && time ./mandelbrot && rm -f ./mandelbrot<br><br>real 0m41.180s<br>user 0m41.116s<br>sys 0m0.040s<br>-bash-3.00# gcc -O2 -mcpu=G3 -ffast-math ./mandelbrot.c -o ./mandelbrot && time ./mandelbrot && rm -f ./mandelbrot<br><br>real 1m14.820s<br>user 1m14.760s<br>sys 0m0.044s<br><br><br><b><i>Magnus Hjorth <mh@omnisys.se></i></b> a écrit :<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16,
255); margin-left: 5px; padding-left: 5px;"> Hi,<br><br>Have you tried using the -ffast-math option?<br><br>/Magnus<br><br><br>On Wed, 21 Feb 2007 20:47:50 +0100<br>Patrice Bouchand <pb_fwd_list@yahoo.fr> wrote:<br><br>> <br>> FYI, I got the following answer on mplayer mailing list:<br>> <br>> > Apparently -mcpu=440fp is the one. However, it's possible, that GCC<br>> > "optimizations" actually make the code slower.<br>> <br>> Can someone confirme this possiblity ?<br>> <br>> Any answer would be greatly appreciated ;) <br>> <br>> <br>> Patrice Bouchand<br>> <br>> <br>> > Hello,<br>> > <br>> > I was searching for the best mcpu option for amcc440, compiling and<br>> > running a small program you can find here: <br>> > http://magnux.free.fr/gcc/mandelbrot.c. My distro is a ppc fedora core<br>> > 6, and results are obviously the same using DENX4.0.<br>> > <br>> >
--------------------<br>> > -bash-3.00# gcc -O2 ./mandelbrot.c -o ./mandelbrot &&<br>> > time ./mandelbrot && rm -f ./mandelbrot<br>> > <br>> > real 1m15.059s<br>> > user 1m14.996s<br>> > sys 0m0.060s<br>> > -bash-3.00# gcc -O2 -mcpu=440 ./mandelbrot.c -o ./mandelbrot &&<br>> > time ./mandelbrot && rm -f ./mandelbrot<br>> > <br>> > real 0m39.606s<br>> > user 0m39.552s<br>> > sys 0m0.028s<br>> > -bash-3.00# gcc -O2 -mcpu=440fp ./mandelbrot.c -o ./mandelbrot &&<br>> > time ./mandelbrot && rm -f ./mandelbrot<br>> > <br>> > real 1m15.016s<br>> > user 1m14.988s<br>> > sys 0m0.024s<br>> > -bash-3.00# gcc -O2 -msoft-float ./mandelbrot.c -o ./mandelbrot &&<br>> > time ./mandelbrot && rm -f ./mandelbrot<br>> > <br>> > real 0m39.577s<br>> > user
0m39.544s<br>> > sys 0m0.032s<br>> > --------------------<br>> > <br>> > * I do not explain why not using FPU gives better results ?<br>> > <br>> > * I did also a test with bzip2.c<br>> > ( http://pag.csail.mit.edu/~smcc/projects/single-file-programs/bzip2.c ).<br>> > <br>> > ----------------------<br>> > -bash-3.00# gcc -O2 ./bzip2.c -o ./bzip2 && time ./bzip2 ./oggenc.c<br>> > && ./bzip2 -d ./oggenc.c.bz2 && rm ./bzip2<br>> > <br>> > real 0m18.478s<br>> > user 0m18.216s<br>> > sys 0m0.152s<br>> > -bash-3.00# gcc -O2 -mcpu=440 ./bzip2.c -o ./bzip2 &&<br>> > time ./bzip2 ./oggenc.c && ./bzip2 -d ./oggenc.c.bz2 && rm ./bzip2<br>> > <br>> > real 0m18.786s<br>> > user 0m18.544s<br>> > sys 0m0.128s<br>> > -bash-3.00# gcc -O2 -mcpu=440fp ./bzip2.c -o ./bzip2 &&<br>>
> time ./bzip2 ./oggenc.c && ./bzip2 -d ./oggenc.c.bz2 && rm ./bzip2<br>> > <br>> > real 0m18.811s<br>> > user 0m18.548s<br>> > sys 0m0.144s<br>> > -bash-3.00# gcc -O2 -mcpu=G3 ./bzip2.c -o ./bzip2 &&<br>> > time ./bzip2 ./oggenc.c && ./bzip2 -d ./oggenc.c.bz2 && rm ./bzip2<br>> > <br>> > real 0m18.871s<br>> > user 0m18.644s<br>> > sys 0m0.104s<br>> > ----------------------<br>> > <br>> > * mcpu option seems to not have any effect ?<br>> > <br>> > * My third test was to compile and run mplayer.<br>> > - With default options (no mcpu specified), my test mpeg was smooth.<br>> > - With mcpu=440fp, my test mpeg was not smooth.<br>> > <br>> > Can anybody bring me some lights about the right gcc mcpu option for<br>> > amcc440 ?<br>> > <br>> > Best regards,<br>> > <br>> >
Patrice Bouchand<br>> > <br>> > <br>> > <br>> > <br>> > ______________________________________________________________________<br>> > Découvrez une nouvelle façon d'obtenir des réponses à toutes vos<br>> > questions ! Profitez des connaissances, des opinions et des<br>> > expériences des internautes sur Yahoo! Questions/Réponses.<br>> > _______________________________________________<br>> > Linuxppc-embedded mailing list<br>> > Linuxppc-embedded@ozlabs.org<br>> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded<br>> <br>> _______________________________________________<br>> Linuxppc-embedded mailing list<br>> Linuxppc-embedded@ozlabs.org<br>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded<br></pb_fwd_list@yahoo.fr></blockquote><br><p> 
                <hr size="1">
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur <a href="http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com">Yahoo! Questions/Réponses</a>.