Commit b37cd94
committed
mmaprototype: pass in scratch stores for computeMeansForStoreSet
Previously, computeMeansForStoreSet allocated a new map on every call to
deduplicate the provided stores list. This commit refactors it to reuse a
scratchStores map (similar to scratchNodes). The caller now allocates this map
once and stores it in the function scope or struct, reducing repeated
allocations.1 parent 49e5b1c commit b37cd94
File tree
2 files changed
+11
-7
lines changed- pkg/kv/kvserver/allocator/mmaprototype
2 files changed
+11
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
359 | 360 | | |
360 | 361 | | |
361 | 362 | | |
| |||
475 | 476 | | |
476 | 477 | | |
477 | 478 | | |
478 | | - | |
| 479 | + | |
479 | 480 | | |
480 | 481 | | |
481 | 482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
| 284 | + | |
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
| |||
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
323 | | - | |
| 324 | + | |
| 325 | + | |
324 | 326 | | |
325 | 327 | | |
326 | 328 | | |
| |||
342 | 344 | | |
343 | 345 | | |
344 | 346 | | |
345 | | - | |
| 347 | + | |
346 | 348 | | |
347 | 349 | | |
348 | 350 | | |
| |||
375 | 377 | | |
376 | 378 | | |
377 | 379 | | |
| 380 | + | |
378 | 381 | | |
379 | 382 | | |
380 | 383 | | |
381 | 384 | | |
382 | 385 | | |
383 | | - | |
| 386 | + | |
384 | 387 | | |
385 | 388 | | |
386 | 389 | | |
387 | | - | |
| 390 | + | |
388 | 391 | | |
389 | 392 | | |
390 | 393 | | |
391 | | - | |
| 394 | + | |
392 | 395 | | |
393 | 396 | | |
394 | 397 | | |
| |||
0 commit comments