On Sat, Dec 14, 2002 at 01:46:19AM -0500, Jean-Marc Valin wrote:> Thanks for the patch. I applied it and it give me up to 15% in speed. > Doesn't seem to change the results, which is a good thing (though you > originally forgot a "used=0" in vq_nbest_sign). I'll check a thing or > two and I'll apply to CVS.D'oh. My carelessness, sorry! :)> Strange... on my PIII, encoding a 10 sec file with --comp 3 --quality 3 > takes less than a second (your patch is still a bit faster). How did you > get these timings?Using zsh's time function (gives real and user time - which are pretty similar on this unloaded machine). I've put my sample wave file at http://dagobah.ucc.asn.au/speextest/sample.wav if anybody wants to compare times. I'm curious now why my machine is slower - perhaps it's something about the way I've compiled it. (Compiles by default with -O2, and I can slice another .07 seconds off by compiling with -O999 :)> Sending it to the list is a good idea I think. If you want to know what > the code does... it's simply calculating the distance between an input > vector and a list of vectors (codebook) and it returns the id's of the N > closest (n-best) codebook vectors.Thanks. I'm beginning to grasp it piece by piece. Currently looking at the codebook search - next culprit on the list as given by gprof (and OPTIMIZE :) Cheers, Bernard. -- Bernard Blackham bernard at blackham dot com dot au Australian Linux Technical Conference 2003: http://www.linux.conf.au/ ^----- presentations will be recorded with speex :) -------------- next part -------------- A non-text attachment was scrubbed... Name: part Type: application/pgp-signature Size: 190 bytes Desc: not available Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20021214/682dae7f/part-0001.pgp
On Sat, Dec 14, 2002 at 06:04:08PM -0500, Jean-Marc Valin wrote:> Maybe not everything got re-compiled and some parts were left with -g or > something? With the files you sent, I get (on my PIII 1 GHz, with -O3): > speexenc --comp 3 --quality 3 sample.wav sample.spx > 0,65s user 0,00s system 100% cpu 0,647 total > > strange...I'm recompiling the lot, no debugging, -O3 (or -O999). The packaged speex1.0beta3 from debian runs in about the same time. I'll just blame it on some weird quirk of my laptop. Thanks though.> > at the codebook search - next culprit on the list as given by gprof > > (and OPTIMIZE :) > > This part is a bit more obscure, but I think there's room for some > optimization there (mostly at higher --comp).I'm still trying to figure out how it all works. If and when I do figure out some optimisations, I'll forward them your way. In the meantime, I've discovered I can gain another 10% speed increase by declaring vq_nbest and vq_best_sign as inline. (They get called so frequently, they may as well be). :) Regards, Bernard -- Bernard Blackham bernard at blackham dot com dot au Australian Linux Technical Conference 2003: http://www.linux.conf.au/ -------------- next part -------------- A non-text attachment was scrubbed... Name: part Type: application/pgp-signature Size: 190 bytes Desc: not available Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20021215/a0557413/part-0001.pgp
> Using zsh's time function (gives real and user time - which are > pretty similar on this unloaded machine). I've put my sample wave > file at http://dagobah.ucc.asn.au/speextest/sample.wav if anybody > wants to compare times. > > I'm curious now why my machine is slower - perhaps it's something > about the way I've compiled it. (Compiles by default with -O2, and I > can slice another .07 seconds off by compiling with -O999 :)Maybe not everything got re-compiled and some parts were left with -g or something? With the files you sent, I get (on my PIII 1 GHz, with -O3): speexenc --comp 3 --quality 3 sample.wav sample.spx 0,65s user 0,00s system 100% cpu 0,647 total trange...> Thanks. I'm beginning to grasp it piece by piece. Currently looking > at the codebook search - next culprit on the list as given by gprof > (and OPTIMIZE :)This part is a bit more obscure, but I think there's room for some optimization there (mostly at higher --comp). Jean-Marc -- Jean-Marc Valin, M.Sc.A. LABORIUS (http://www.gel.usherb.ca/laborius) Université de Sherbrooke, Québec, Canada <p> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 242 bytes Desc: signature.asc Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20021214/641b34aa/signature-0001.pgp