Stephen Wille Padnos wrote: > > I was in the middle of writing a similar statement, with some general > instructions on writing a test program, when I decided to just write the > test program instead :) I found that the first version runs 1,000,000 > loops in about 0.5 seconds (on a 2.2 GHz Core 2 Duo), whereas the second > takes about 2 seconds. By making my own "sqr" function, that was cut > down to about 1.5 seconds (this surprised me because I would have > expected common subexpression elimination to work there, but I suppose > gcc can't know if any of the called math functions save some state and > may therefore return different values from call to call). > > Very interesting! Well, there are these outfits that sell super-optimizing compilers and claim their code runs significantly faster than GCC. My boss is still stuck in the Fortran world (gag, choke) and bought one, and he claims it can be twice as fast as g77 on heavy math stuff. The old DEC compilers on Vax and Alpha were REALLY good.
Jon ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
