Commit c9009ba
perf: pre-allocate slice capacity in evalRetrieve
Pre-allocate the slice capacity in `evalRetrieve` using `make([]result.Value, 0, len(got))` to avoid multiple reallocations as the slice grows. This is a standard optimization in Go when the maximum size of the resulting slice is known beforehand.
Co-authored-by: suyashkumar <6299853+suyashkumar@users.noreply.github.com>1 parent 8a5a5fa commit c9009ba
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
0 commit comments