This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Commit ecd8216
[vm/concurrency] Avoid allocating objects if not needed (and possibly cache objects)
Two growable arrays needed for possibly re-hashing objects when sending
messages using the snappshotter are often unused. Only create them when
needed.
When looking up message handler and calling it avoid repeated
allocations of small arrays (they can be cached savely because right
the transition stubs will copy the arguments out of those arrays).
This improves performance of high-frequency messages but small message
handlers.
Issue dart-lang/sdk#36097
Change-Id: I623aba5b29064f3a75ea294557ee153067a63d08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148263
Reviewed-by: Ryan Macnak <[email protected]>
Commit-Queue: Martin Kustermann <[email protected]>1 parent 34bf674 commit ecd8216
3 files changed
+25
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
661 | | - | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
662 | 667 | | |
663 | 668 | | |
664 | 669 | | |
| |||
687 | 692 | | |
688 | 693 | | |
689 | 694 | | |
690 | | - | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
691 | 701 | | |
692 | 702 | | |
693 | 703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| 257 | + | |
| 258 | + | |
257 | 259 | | |
258 | 260 | | |
259 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | 316 | | |
320 | 317 | | |
321 | 318 | | |
| |||
344 | 341 | | |
345 | 342 | | |
346 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
| 351 | + | |
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
365 | 368 | | |
366 | 369 | | |
367 | 370 | | |
368 | 371 | | |
369 | | - | |
| 372 | + | |
370 | 373 | | |
371 | 374 | | |
372 | 375 | | |
| |||
575 | 578 | | |
576 | 579 | | |
577 | 580 | | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
578 | 584 | | |
579 | 585 | | |
580 | 586 | | |
| |||
0 commit comments