On Sun, Dec 15, 2002 at 02:15:51PM -0500, Jean-Marc Valin wrote:> I thought that -O3 would inline those functions, but I'll have a closer > look... I'm not sure how C inlining works. Does the inlined function > need to be in a .h?I believe either the .h or the .c or both (both for consistency). It does seem an obvious optimisation for gcc to do though. Maybe because its in a different source file perhaps? No idea. Rgds, 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/20021216/33b29cf6/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
> 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). :)I thought that -O3 would inline those functions, but I'll have a closer look... I'm not sure how C inlining works. Does the inlined function need to be in a .h? 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/20021215/4c93a618/signature-0001.pgp