Bug 253155 - Reserve space for vectors if possible
Summary: Reserve space for vectors if possible
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-01 07:43 PST by Seija K.
Modified: 2023-03-02 13:23 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Seija K. 2023-03-01 07:43:18 PST
It is good practice to reserve space in vectors before pushing back new elements
with each iteration, as it saves the work of reallocating space between
each push_back or emplace_back.
Comment 1 Seija K. 2023-03-01 07:44:46 PST
Pull request: https://github.com/WebKit/WebKit/pull/10688
Comment 2 EWS 2023-03-02 13:22:13 PST
Committed 261092@main (8292d20a046a): <https://commits.webkit.org/261092@main>

Reviewed commits have been landed. Closing PR #10688 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-03-02 13:23:15 PST
<rdar://problem/106160494>