Bug 217328

Summary: Use memset to zero vectors in PeriodicWave::createBandLimitedTables()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web AudioAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, darin, eric.carlson, ews-watchlist, ggaren, glenn, jer.noble, philipj, sam, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 212611    
Attachments:
Description Flags
Patch none

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>