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

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Hello - FYI - intro
From: Erik de Castro Lopo (erikd-lad_AT_mega-nerd.com)
Date: Thu Aug 26 2004 - 00:43:44 EEST


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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Aug 26 2004 - 00:51:53 EEST