[Webkit-unassigned] [Bug 77950] SSE optimization for vsvesq and vmaxmgv

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 15 13:18:53 PST 2012


--- Comment #6 from Raymond Toy <rtoy at chromium.org>  2012-02-15 13:18:54 PST ---
(From update of attachment 126033)
View in context: https://bugs.webkit.org/attachment.cgi?id=126033&action=review

> Source/WebCore/ChangeLog:8
> +        Achieved the performance of 3.7x on vsvesq and 4.1x on vmaxmgv.

Out of curiosity is this speed up measured using the typical 128-length vectors?  Or did you use longer vectors so that the initial setup is in the noise?

> Source/WebCore/platform/audio/VectorMath.cpp:500
> +            mMin = _mm_min_ps(mMin, source);

I think it would be more in line with the original code to compute the absolute value before computing the max.  Something like

source = _mm_and_ps(source, mask);
mMax = _mm_max_ps(mMax, source);

where mask is #x7fffffff (4 copies, one for each float).  I think this would be as fast as the current code.

If this is done, then lines 505-507 can be deleted.

> Source/WebCore/platform/audio/VectorMath.cpp:514
> +

What is the reason for the temp variable?  Is this an optimization so that we're not reading and writing to the same max variable?

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list