On Aug 31, 2005, at 10:38 PM, David Mann wrote:
There is some, particularly in the components that are optimized
to to take advantage of the native hardware signal processing
capabilities integrated into the PowerPC G4/G5 and Pentium series
cpus. Hand-coded instructions in these critical sections, by
someone who knows how to take advantage of them, can net enormous
gains in processing speed. It's very carefully factored, of course.
This kind of thing is becoming less common as modern CPUs are so
complex that a good compiler will generate faster code than hand-
tuned assembly. Provided the code is written in a way that the
compiler will optimise it well ;)
Very true, but for some things hand-coded assembly language still
works best. For instance, using VAST and DEEP optimization tools or a
*good* auto-vectorizing compiler for Altivec optimization, the net
improvement in efficiency for most scenarios runs about 30-50%
performance improvement ... a very good result from automated
vectorization/optimization. However, a good coder with insight into
Altivec's capabilities and the source code can realize optimization
gains in the 10-12x range with hand coding ... now that's a
staggering difference.
The difference is that the 30-50% gains with the automated tools
might mean more value for large bodies of code, where the number of
code sections that can be optimized to the maximum extent by hand
tend to be a lot smaller. As with all optimization strategies, one
has to pick and choose very carefully not only what to optimize but
how to do the optimization to obtain the maximum benefit and
performance per development dollar.
Godfrey