Closed Bug 1642016 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 23864 - Vectorize DelayNode processor for k-rate delays

Categories

(Core :: Web Audio, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 23864 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/23864
Details from upstream follow.

Raymond Toy <rtoy@chromium.org> wrote:

Vectorize DelayNode processor for k-rate delays

Instead of processing the data one sample at a time, we can process
a block at a time by doing large memcpy's and then some vector
operations to interpolate the samples. As a final micro-optimization,
if the interpolation factor is 0, we can skip the interpolation phase
altogether.

Using (a slightly modified) Spotify's Web Audio Bench, we have the
following results using 500 runs of 10 sec each (the default):

Without CL:
TEST μs MIN Q1 MEDIAN Q3 MAX MEAN STDDEV
Baseline 737 737 936 949 965 1569 948.43 50.06
Delay-default 323 323 422 448 482 1187 453.45 52.66
Delay-0.1 367 367 457 486 518 1286 488.73 54.62
DelayAutomation-a-rate 951 951 1048 1081 1114 2837 1091.22 101.66
DelayAutomation-k-rate 371 371 469 509 548 803 510.85 52.86

With CL:
TEST μs MIN Q1 MEDIAN Q3 MAX MEAN STDDEV
Baseline 880 880 930 943 956 1004 943.93 20.42
Delay-default 217 217 282 308 340 1310 314.37 61.12
Delay-0.1 266 266 362 387 414 1221 390.39 53.19
DelayAutomation-a-rate 859 859 975 993 1014 1177 995.08 35.42
DelayAutomation-k-rate 264 264 338 367 404 549 370.83 42.33

As we can see, the CL speeds up processing the default, 0.1 and k-rate
test by about 30%. This difference is statistically significant.

One layout test needed to be updated to handle numerical differences
for mac. The implementation of Vsma on mac is different from linux and
windows. and this difference shows up in the test. (Mac uses VDSP_vsma,
instead of our hand-written Vsma.)

Bug: 1087071
Change-Id: I2b95096fef9fd1e5f7c87e4f4bdfa7d52f5b8d58
Reviewed-on: https://chromium-review.googlesource.com/2171843
WPT-Export-Revision: b67f09a064aaf1922383444d9dc78802ad459e14

Component: web-platform-tests → Web Audio
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 19 subtests

Status Summary

Firefox

OK : 1
PASS: 6
FAIL: 3

Chrome

OK : 1
PASS: 19

Safari

OK : 1
PASS: 6
FAIL: 3

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/webaudio/the-audio-api/the-delaynode-interface/no-dezippering.html
Executing "test2": FAIL (Chrome: PASS, Safari: FAIL)
Executing "test0": FAIL (Chrome: PASS, Safari: FAIL)
Executing "test1": FAIL (Chrome: PASS, Safari: FAIL)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fcb96ec497a6 [wpt PR 23864] - Vectorize DelayNode processor for k-rate delays, a=testonly
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.