The reasons I have posted these questions are: <div><div>1) To find out if Speex can take advantage of SIMD extensions.</div><div>2) To maybe learn from someone with previous experience in optimizing Speex for moderns x86 architectures before I set off trying all kinds of things on my own.</div>
<br>See answers inline:</div><div class="gmail_quote">2009/6/15 Tom Grandgent <span dir="ltr"><<a href="mailto:tom@grandgent.com" target="_blank">tom@grandgent.com</a>></span><div class="im"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Why haven't you tried using release build with compiler optimizations?</blockquote></div><div>I just haven't started with optimizing... yet.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
It's quite possible that the performance picture could be substantially<br>
different. You might end up wasting a lot of time if you do much<br>
performance analysis or optimization on a debug build. </blockquote></div><div>Yes, you are right and that is not what I'm doing.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Debug build<br>
not only has no optimization - it also has extra checks that may have a<br>
significant performance impact depending on the code.</blockquote></div><div>Possibly, but I have identified the most expensive functions. They are all from the Speex dll. I believe these will remain the most interesting ones also in release build with some O-flags.</div>
<div>Someone who is knowledgeable in these functions might know if their impact can be reduced and what the best practices are.</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
If you want to profile with symbols, you know you can compile a release<br>
build with symbols, right? The CodeAnalyst documentation describes<br>
how to do that with Visual Studio. (I've done it.)</blockquote></div><div>Ok. thx. </div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<font color="#888888"><br>
Tom<br>
</font><div><div><br>
Greger Burman <<a href="mailto:greger@mobile-robotics.com" target="_blank">greger@mobile-robotics.com</a>> wrote:<br>
><br>
> I have a question about the overall performance of Speex and what I can do<br>
> to improve it. I'm running Speex Windows x86, Visual C++ EE compiler. I will<br>
> say right away that I've only compiled debug so far and used no compiler<br>
> optimizations at all.<br>
> I use the uwb-mode, preprocessing, denoising and echo cancellation.<br>
> I've noticed that speex consumes a lot of cpu resources. When I run this on<br>
> a Celeron 2,6GHz I have to disable EC in order to not overload the cpu. Am I<br>
> correct to assume that there are massive floating point calculations<br>
> happening?<br>
> I did a quick profile with CodeAnalyst and identified the most expensive<br>
> functions as (in order):<br>
> CPU Clocks, Function<br>
> 4657, kiss_fft_stride<br>
> 4456, speex_echo_cancellation<br>
> 2494, split_cb_search_shape_sign<br>
> 1490, fir_mem16<br>
> 1419, speex_preprocess_run<br>
> I'm looking for advise on how to boost the performance with as little code<br>
> rewrite as possible. The architecture for release build will be SSE/SSE2<br>
> capable.<br>
> 1) Compiler optimizations: Recommended options?<br>
> 2) SIMD. Is Speex written to take advantage of SIMD architectures? What must<br>
> I do to take advantage of this?<br>
> --<br>
> Greger Burman<br>
<br>
</div></div></blockquote></div></div></div><br>