is optimized software really faster?
If you have a system like gentoo that is optimiized for you specific processor, althon xp in my case. Is this truely faster then a system built with bianaries that are built to run on an i386 machine? I realize in theory they are, but in practice can anyone really tell the difference? Are there any benchmarks that show the difference?
|
Not sure about benchmarks but they would be faster than binaries.
Only bad thing about the optimisation of say gentoo is the compile time. Especailly on older pcs imo. |
I use Gentoo and since I hit Linux Gentoo 2.6.9 on grub, until Fluxbox is ready, the elapsed time is 1minute....
Before I was using FC3 and it took around 1:35 - 1:40 to start up. I really think it's way faster, but, as said above, compilation sometimes is endless (took me more than 1h to compile qt libraries) |
this is only for floating point math so the results are not that significant overall
http://home.comcast.net/~jcunningham...imization.html his results with athlon xp show roughly 47% increase in speed from -O3 -march=i386 350 seconds to -march=athlon-xp -O3 -ffast-math -malign-double -funroll-loops -pipe -fomit-frame-pointer -msse -mfpmath=sse,387 241 seconds the results would be even greater if he had used -O2 on the baseline on my own machine i did tests once and came up with an overall increase of 11% for i/o throughput but that was just with compiling the test with different flags. if you were to factor in how much slower it would actually be on a non optimized kernel/non optimized filesystem etc i would imagine it would be at least 25% or greater |
thanks, that is some good information.
|
Quote:
|
I'm sure these optimizations can really make a difference in computationally heavy tasks, like 3D rendering, audio/video encoding etc. number crunching.
But I doubt it makes any noticeable difference in the everyday desktop usage, X performance? Or does it? Anyone? |
I don't think it creates a noticeable difference at all. Don't get me wrong, I use and love gentoo, but not for any supposed speed increase.
I used to be one of those gentoo 'ricers' that used uber-optimized gcc flags, but gave up because of broken builds and unstable software. Now I use a 'sober' -O2 While a .002 second speed increase may be nice in the HPC domain, it is meaningless to your typical end user. Real gentoo'ers know the reason we use it is because of: 1. choice 2. portage not any supposed speed increase. |
Quote:
seconds on a P4 1.6 ... Mandreck (i586) on the same machine was booting in 110 ... does that mean that i386 code is faster? Or do you think it might be due to different services that are being started and the way the init-scripts work? As others have pointed out ... it won't have much impact on everyday work. I noticed a negligable difference in e.g. video-stream encoding when I recompiled transcode (and the libs it uses) for -march=pentium4 -msse2 ... encoding the same video gained just under a minute, which doesn't make a lot of a difference when you're looking at 7 hours ;) Cheers, Tink |
in case anyone missed the 'ricer' reference:
http://funroll-loops.org/ careful, naughty language therein. |
Quote:
do a google as there are alot of references out there: http://home.comcast.net/~jcunningham...ion_Flags.html http://freshmeat.net/articles/view/730/ http://www.emerson.emory.edu/service...e_Options.html |
Overall: the actual performance increase is not really worth the time spent on recompiling everything with every bell-and-whizbang-"optimization"-settings.
But in specific cases of particular programmes there are noticeable performance increases though. As with all performance optimization: identify your bottleneck first. Then resolve that bottleneck and move onto the next bottleneck. There are many bottlenecks to fix before one needs to go beyond a plain -O2 optimization during compilation (and in many cases an -O3 just makes the code slower and the executable far more bloated sizewise). |
In the March edition of Linux Journal, a test was conducted with a script that "performs a bubble search over 10,000 elements. The elements in the array have been reversed to force the worst-case scenario". Results:
$ gcc -o sort sort.c -O2 $ time ./sort real 0m1.036s user 0m2.030s sys 0m0.000s $ gcc -o sort sort.c -O2 -march=pentium2 $ time ./sort real 0m0.799s user 0m0.790s sys 0m0.010s There was a 237ms (23%) speed increase. The tests were conducted on a 633MHz Celeron. Hope this helps. |
Im sorry but this gentoo speed increase crap is a bunch of bs. It does nothing to decrease interactivity and latency and is mostly useless on a desktop os. I'd rather wait .0002 seconds longer for firefox to startup then waste 10 hours compiling it. What a waste of time and cpu cycles. The only difference it makes is in programs that occupy the cpu 100% and do caclulation intensive tasks like number crunching and video or music encoding.
In fact for some programs it INCREASES startup time by making the binary bigger. In the words of Vanilla Ice: rice rice baby... ;) |
Could have sworn that's what I said 6 posts ago, but a lot more politely.
Stop equating gentoo users with ricers. We're not all boneheads you know. |
All times are GMT -5. The time now is 04:16 PM. |