View Issue Details

IDProjectCategoryView StatusLast Update
0002586ardourotherpublic2009-05-31 05:45
Reportermtaht Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionopen 
Product VersionSVN/2.0-ongoing 
Summary0002586: Tracking progress on oprofile
Descriptionevery so often I get a bee in my bonnet regarding finding sources of performance loss, and ways to fix them...

I recently oprofiled a debuggable version of ardour and spotted a theoretically good spot to optimize in panner.cc, 3 loops that should probably be one...

THEN I compiled ardour optimized and discovered that the vectorizer was actually vectorizing two of those three loops, thus reducing the overhead of that function to much further below the noise floor, and exposing new issues.

So I wrote the more complex function in C and it was a big win. Yea.
g++ cannot vectorize it (as yet). Boo.

It is kind of my hope to find some across the board patterns that are wins and identify other areas that can be optimized in audio code, given the current state of the compilers.
Additional InformationA non-optimized profile of an export with pan and gain automation:

http://www.teklibre.com/~d/ardour/panner.txt

Optimized version:

http://www.teklibre.com/~d/ardour/opanner.txt

Check out all the time in feholdexcept and fesetenv!

Thought: It would be good to do debuggable builds with the same optimizations as the shipped build, it would help spot more bugs in general.

TagsNo tags attached.

Activities

mtaht

2009-03-21 15:35

developer   ~0005841

From looking at the last oprofile I determined 2 things.

The jack I was running was probably not running SSE.

Despite compiling jackdmp and installing it, it gets installed in the wrong place on x86_64 by default - or jack does - jack goes by defaault into /usr/local/lib64 and jackdmp goes into /usr/local/lib.

it wasn't clear to me how to convince jackdmp (from svn) to engage it's sse code, so I hacked up wscript to make sure it did. The Jackdmp equivalent of mix buffers is now a very small precentage of the run time.

http://www.teklibre.com/~d/ardour/jackdmp_profile.txt

mtaht

2009-05-31 05:45

developer   ~0006042

gcc 4.4 optimizes two of the 3 loops well, but not the third. Combining the loops into a more complex loop does not get optimized at all. Rewriting in assembly is kind of pointless.

And lastly, the feholdexcept and fesetenv problems are coming from calf, not ardour.

closing this bug. Joys of profiling.

Issue History

Date Modified Username Field Change
2009-03-21 06:09 mtaht New Issue
2009-03-21 06:09 mtaht cost => 0.00
2009-03-21 15:35 mtaht Note Added: 0005841
2009-05-31 05:45 mtaht Note Added: 0006042
2009-05-31 05:45 mtaht Status new => closed