Commit 646ea2a
perf: Reserve space for holders_ in DecodedArgs constructor (#15418)
Summary:
Pull Request resolved: #15418
The DecodedArgs constructor was populating the holders_ vector without
pre-allocating space, which could cause multiple reallocations as the
vector grows. This adds a reserve() call before the loop to allocate
space upfront for all elements, improving performance by avoiding
unnecessary allocations and copies.
Reviewed By: Yuhta
Differential Revision: D86366246
fbshipit-source-id: ded985a5a2410b578a97626d2f6e7d88654750eb1 parent 746d257 commit 646ea2a
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments