Bug 217328 - Use memset to zero vectors in PeriodicWave::createBandLimitedTables()
Summary: Use memset to zero vectors in PeriodicWave::createBandLimitedTables()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 212611
  Show dependency treegraph
 
Reported: 2020-10-05 12:54 PDT by Chris Dumez
Modified: 2020-10-05 14:30 PDT (History)
11 users (show)

See Also:


Attachments
Patch (2.33 KB, patch)
2020-10-05 12:55 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-10-05 12:54:12 PDT
Use memset to zero vectors in PeriodicWave::createBandLimitedTables() instead of a for loop.
Comment 1 Chris Dumez 2020-10-05 12:55:58 PDT
Created attachment 410540 [details]
Patch
Comment 2 Darin Adler 2020-10-05 14:03:49 PDT
Comment on attachment 410540 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=410540&action=review

> Source/WebCore/ChangeLog:9
> +        Use memset to zero vectors in PeriodicWave::createBandLimitedTables() instead of a for
> +        loop, for performance reasons.

On reflection, Iā€™m surprised this improves performance. I would expect a modern compiler to convert both into the exact same code.
Comment 3 EWS 2020-10-05 14:29:50 PDT
Committed r268002: <https://trac.webkit.org/changeset/268002>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 410540 [details].
Comment 4 Radar WebKit Bug Importer 2020-10-05 14:30:28 PDT
<rdar://problem/69971290>