[linux-audio-dev] Hello - FYI - intro

Erik de Castro Lopo erikd-lad at mega-nerd.com
Wed Aug 25 21:43:44 UTC 2004


On Wed, 25 Aug 2004 10:00:30 -0400 (GMT-04:00)
Taybin Rutkin <taybin at earthlink.net> wrote:

> Just out of curiousity, what optimizations did he suggest and 
> which ones were a good idea?

The main two "optimisations" were measurable in isolation (small
test programs), but not in the benchmark program:

   - I was using my own endswap macros. I had benchmarked mine
     and they performed well in comparison to one I found in
     ffmpeg but not in comparion to the ones in <byteswap.h>

   - Inner loops were changed from:

        while (count) { count -- ; /* whatever */ }

     to :

        while (--count >= 0) { /* whatever */ }

Other suggestions (which couldn't be easily tested in isolation
and made no measurable difference in the real benchmark) included:

   - Rewrite a loop which contains a read() system call on 16k
     of data so that the "long long" which is incremented inside
     the loop can be changed to an int.

   - Changing a whole bunch of functions to inline.

The above exercise took up a whole bunch of my time for negligible
gain. Personally I wish I had that time back to wok on more useful
and interesting stuff.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  nospam at mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"UNIX was not designed to stop you from doing stupid things,  because
that would also stop you from doing clever things."  -- Doug Gwyn



More information about the Linux-audio-dev mailing list