DescriptionRemove static const from AudioBus interleave methods and optimize!
Using the new AudioBusTest::InterleaveBench on my Z600 over 5 runs:
Old:
ToInterleaved uint8 took 57.95ms.
FromInterleaved uint8 took 24.76ms.
ToInterleaved int16 took 47.67ms.
FromInterleaved int16 took 23.06ms.
ToInterleaved int32 took 59.64ms.
FromInterleaved int32 took 26.53ms.
New:
ToInterleaved uint8 took 56.09ms.
FromInterleaved uint8 took 21.91ms.
ToInterleaved int16 took 32.68ms.
FromInterleaved int16 took 22.96ms.
ToInterleaved int32 took 42.30ms.
FromInterleaved int32 took 33.45ms.
Results are faster across the board except for FromInterleaved int32
which lost ~10ms with the removal of the static const versus an inline
constant. I'm writing it off to helpful pipelining.
Overall the new methods are ~13% faster. Benchmarking 10000 calls of
each data type over 480 frames instead of a single block of 120 seconds
of audio yields an even more impressive 2.7x speedup on OSX:
Old:
[ OK ] AudioBusTest.DISABLED_InterleaveBench (3157 ms)
New:
[ OK ] AudioBusTest.DISABLED_InterleaveBench (1154 ms)
Linux saw only a 10% improvement though -- the discrepancy likely has
to do with OSX's usage of SSE2 instructions (versus no-SSE for Linux).
The new methods are ~15% faster in aggregate on Windows. It's ~ the same
on ToInterleaved() except in the int32 case where the new method is ~40% faster.
FromInterleaved() is ~ the same except for the uint8 case which is ~70% faster.
BUG=224662
TEST=media_unittests
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194467
Patch Set 1 : Linux benchmarks. #
Total comments: 3
Patch Set 2 : Rebase. #
Messages
Total messages: 15 (0 generated)
|