Skip to content

feat: optimized async-runtime (replace for gstd)#1090

Open
vobradovich wants to merge 76 commits into
masterfrom
vo/async-runtime
Open

feat: optimized async-runtime (replace for gstd)#1090
vobradovich wants to merge 76 commits into
masterfrom
vo/async-runtime

Conversation

@vobradovich
Copy link
Copy Markdown
Member

@vobradovich vobradovich commented Oct 16, 2025

  • Reduce number of hashmaps to 2
  • Task now tracks the user future, pending reply locks, and (non-ethexe) critical hooks, letting message_loop reuse locks and enforce timeouts.
  • Added WakeSignals to manage reply lifecycle states—Pending, Ready, Timeout—so record_reply, poll, and timeout propagation share one typed registry, including optional reply hooks and automatic wake/cleanup
  • Refined Lock to store deadline and wait type

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Benchmark Comparison

Benchmark Current Baseline Change Change % Status
compute 450_513_682_804 450_514_036_959 -354_155 -0.00%
alloc-0 563_780_574 564_376_739 -596_165 -0.11%
alloc-12 567_287_166 567_864_696 -577_530 -0.10%
alloc-143 726_655_761 727_298_127 -642_366 -0.09%
alloc-986 827_641_528 828_290_311 -648_783 -0.08%
alloc-10945 2_018_406_054 2_019_067_671 -661_617 -0.03%
alloc-46367 6_403_667_537 6_404_351_520 -683_983 -0.01%
alloc-121392 16_858_359_295 16_859_084_038 -724_743 -0.00%
alloc-317810 43_146_678_632 43_147_409_792 -731_160 -0.00%
counter_sync 637_172_916 678_860_419 -41_687_503 -6.14% 🚀
counter_async 803_743_595 851_480_964 -47_737_369 -5.61% 🚀
cross_program 2_238_739_732 2_436_719_419 -197_979_687 -8.12% 🚀
redirect 3_196_784_116 3_473_474_864 -276_690_748 -7.97% 🚀
stack_0 69_973_200_200 79_911_236_500 -9_938_036_300 -12.44% 🚀
stack_1 336_011_176_400 376_957_078_300 -40_945_901_900 -10.86% 🚀
stack_5 1_403_245_117_700 1_569_303_378_600 -166_058_260_900 -10.58% 🚀
stack_10 2_621_402_663_900 2_959_197_465_500 -337_794_801_600 -11.42% 🚀
stack_20 5_178_992_367_100 6_398_916_489_100 -1_219_924_122_000 -19.06% 🚀

Legend

  • 🚀 Significant improvement (>5% reduction)
  • 👍 Minor improvement (<5% reduction)
  • ✅ No significant change
  • ⚠️ Minor regression (<5% increase)
  • ❌ Significant regression (>5% increase)

🤖 This comment was automatically generated by the benchmark comparison workflow at c467f28.

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Benchmark Comparison

Benchmark Current Baseline Change Change % Status
compute 450_513_682_804 450_514_036_959 -354_155 -0.00%
alloc-0 563_780_574 564_376_739 -596_165 -0.11%
alloc-12 567_287_166 567_864_696 -577_530 -0.10%
alloc-143 726_655_761 727_298_127 -642_366 -0.09%
alloc-986 827_641_528 828_290_311 -648_783 -0.08%
alloc-10945 2_018_406_054 2_019_067_671 -661_617 -0.03%
alloc-46367 6_403_667_537 6_404_351_520 -683_983 -0.01%
alloc-121392 16_858_359_295 16_859_084_038 -724_743 -0.00%
alloc-317810 43_146_678_632 43_147_409_792 -731_160 -0.00%
counter_sync 637_172_916 678_860_419 -41_687_503 -6.14% 🚀
counter_async 803_743_595 851_480_964 -47_737_369 -5.61% 🚀
cross_program 2_238_739_732 2_436_719_419 -197_979_687 -8.12% 🚀
redirect 3_196_784_116 3_473_474_864 -276_690_748 -7.97% 🚀
stack_0 699_732_002 79_911_236_500 -79_211_504_498 -99.12% 🚀
stack_1 3_360_111_764 376_957_078_300 -373_596_966_536 -99.11% 🚀
stack_5 14_032_451_177 1_569_303_378_600 -1_555_270_927_423 -99.11% 🚀
stack_10 26_214_026_639 2_959_197_465_500 -2_932_983_438_861 -99.11% 🚀
stack_20 51_789_923_671 6_398_916_489_100 -6_347_126_565_429 -99.19% 🚀

Legend

  • 🚀 Significant improvement (>5% reduction)
  • 👍 Minor improvement (<5% reduction)
  • ✅ No significant change
  • ⚠️ Minor regression (<5% increase)
  • ❌ Significant regression (>5% increase)

🤖 This comment was automatically generated by the benchmark comparison workflow at ffc0489.

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Benchmark Comparison

Benchmark Current Baseline Change Change % Status
compute 450_513_682_804 450_514_036_959 -354_155 -0.00%
alloc-0 563_780_574 564_376_739 -596_165 -0.11%
alloc-12 567_287_166 567_864_696 -577_530 -0.10%
alloc-143 726_655_761 727_298_127 -642_366 -0.09%
alloc-986 827_641_528 828_290_311 -648_783 -0.08%
alloc-10945 2_018_406_054 2_019_067_671 -661_617 -0.03%
alloc-46367 6_403_667_537 6_404_351_520 -683_983 -0.01%
alloc-121392 16_858_359_295 16_859_084_038 -724_743 -0.00%
alloc-317810 43_146_678_632 43_147_409_792 -731_160 -0.00%
counter_sync 637_172_916 678_860_419 -41_687_503 -6.14% 🚀
counter_async 803_743_595 851_480_964 -47_737_369 -5.61% 🚀
cross_program 2_238_138_550 2_436_719_419 -198_580_869 -8.15% 🚀
redirect 3_195_826_688 3_473_474_864 -277_648_176 -7.99% 🚀
stack_0 700_149_834 79_911_236_500 -79_211_086_666 -99.12% 🚀
stack_1 3_361_996_318 376_957_078_300 -373_595_081_982 -99.11% 🚀
stack_5 14_040_202_619 1_569_303_378_600 -1_555_263_175_981 -99.11% 🚀
stack_10 26_229_111_691 2_959_197_465_500 -2_932_968_353_809 -99.11% 🚀
stack_20 51_819_675_943 6_398_916_489_100 -6_347_096_813_157 -99.19% 🚀

Legend

  • 🚀 Significant improvement (>5% reduction)
  • 👍 Minor improvement (<5% reduction)
  • ✅ No significant change
  • ⚠️ Minor regression (<5% increase)
  • ❌ Significant regression (>5% increase)

🤖 This comment was automatically generated by the benchmark comparison workflow at 206f898.

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Benchmark Comparison

Benchmark Current Baseline Change Change % Status
compute 450_513_682_804 450_514_036_959 -354_155 -0.00%
alloc-0 563_780_574 564_376_739 -596_165 -0.11%
alloc-12 567_287_166 567_864_696 -577_530 -0.10%
alloc-143 726_655_761 727_298_127 -642_366 -0.09%
alloc-986 827_641_528 828_290_311 -648_783 -0.08%
alloc-10945 2_018_406_054 2_019_067_671 -661_617 -0.03%
alloc-46367 6_403_667_537 6_404_351_520 -683_983 -0.01%
alloc-121392 16_858_359_295 16_859_084_038 -724_743 -0.00%
alloc-317810 43_146_678_632 43_147_409_792 -731_160 -0.00%
counter_sync 637_172_916 678_859_589 -41_686_673 -6.14% 🚀
counter_async 803_743_595 851_480_134 -47_736_539 -5.61% 🚀
cross_program 2_238_138_550 2_436_719_419 -198_580_869 -8.15% 🚀
redirect 3_194_681_197 3_474_613_683 -279_932_486 -8.06% 🚀
stack_0 700_149_834 799_115_685 -98_965_851 -12.38% 🚀
stack_1 3_361_996_318 3_769_584_063 -407_587_745 -10.81% 🚀
stack_5 14_040_202_619 15_693_086_906 -1_652_884_287 -10.53% 🚀
stack_10 26_229_111_691 29_592_077_575 -3_362_965_884 -11.36% 🚀
stack_20 51_819_675_943 63_989_367_411 -12_169_691_468 -19.02% 🚀

Legend

  • 🚀 Significant improvement (>5% reduction)
  • 👍 Minor improvement (<5% reduction)
  • ✅ No significant change
  • ⚠️ Minor regression (<5% increase)
  • ❌ Significant regression (>5% increase)

🤖 This comment was automatically generated by the benchmark comparison workflow at aa6fb5e.

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Benchmark Comparison

Benchmark Current Baseline Change Change % Status
compute 450_513_682_804 450_514_036_959 -354_155 -0.00%
alloc-0 563_780_574 564_376_739 -596_165 -0.11%
alloc-12 567_287_166 567_864_696 -577_530 -0.10%
alloc-143 726_655_761 727_298_127 -642_366 -0.09%
alloc-986 827_641_528 828_290_311 -648_783 -0.08%
alloc-10945 2_018_406_054 2_019_067_671 -661_617 -0.03%
alloc-46367 6_403_667_537 6_404_351_520 -683_983 -0.01%
alloc-121392 16_858_359_295 16_859_084_038 -724_743 -0.00%
alloc-317810 43_146_678_632 43_147_409_792 -731_160 -0.00%
counter_sync 637_172_916 678_859_589 -41_686_673 -6.14% 🚀
counter_async 803_743_595 851_480_134 -47_736_539 -5.61% 🚀
cross_program 2_238_138_550 2_436_719_419 -198_580_869 -8.15% 🚀
redirect 3_194_681_197 3_474_613_683 -279_932_486 -8.06% 🚀
stack_0 700_149_834 799_115_685 -98_965_851 -12.38% 🚀
stack_1 3_361_996_318 3_769_584_063 -407_587_745 -10.81% 🚀
stack_5 14_040_202_619 15_693_086_906 -1_652_884_287 -10.53% 🚀
stack_10 26_229_111_691 29_592_077_575 -3_362_965_884 -11.36% 🚀
stack_20 51_819_675_943 63_989_367_411 -12_169_691_468 -19.02% 🚀

Legend

  • 🚀 Significant improvement (>5% reduction)
  • 👍 Minor improvement (<5% reduction)
  • ✅ No significant change
  • ⚠️ Minor regression (<5% increase)
  • ❌ Significant regression (>5% increase)

🤖 This comment was automatically generated by the benchmark comparison workflow at 4e23f98.

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Benchmark Comparison

Benchmark Current Baseline Change Change % Status
compute 450_513_682_804 450_514_036_959 -354_155 -0.00%
alloc-0 563_780_574 564_376_739 -596_165 -0.11%
alloc-12 567_287_166 567_864_696 -577_530 -0.10%
alloc-143 726_655_761 727_298_127 -642_366 -0.09%
alloc-986 827_641_528 828_290_311 -648_783 -0.08%
alloc-10945 2_018_406_054 2_019_067_671 -661_617 -0.03%
alloc-46367 6_403_667_537 6_404_351_520 -683_983 -0.01%
alloc-121392 16_858_359_295 16_859_084_038 -724_743 -0.00%
alloc-317810 43_146_678_632 43_147_409_792 -731_160 -0.00%
counter_sync 637_172_916 678_859_589 -41_686_673 -6.14% 🚀
counter_async 803_743_595 851_480_134 -47_736_539 -5.61% 🚀
cross_program 2_238_138_550 2_436_719_419 -198_580_869 -8.15% 🚀
redirect 3_194_681_197 3_474_613_683 -279_932_486 -8.06% 🚀
stack_0 700_149_834 799_115_685 -98_965_851 -12.38% 🚀
stack_1 3_361_996_318 3_769_584_063 -407_587_745 -10.81% 🚀
stack_5 14_040_202_619 15_693_086_906 -1_652_884_287 -10.53% 🚀
stack_10 26_229_111_691 29_592_077_575 -3_362_965_884 -11.36% 🚀
stack_20 51_819_675_943 63_989_367_411 -12_169_691_468 -19.02% 🚀

Legend

  • 🚀 Significant improvement (>5% reduction)
  • 👍 Minor improvement (<5% reduction)
  • ✅ No significant change
  • ⚠️ Minor regression (<5% increase)
  • ❌ Significant regression (>5% increase)

🤖 This comment was automatically generated by the benchmark comparison workflow at cfaa861.

@vobradovich vobradovich marked this pull request as ready for review October 20, 2025 12:06
@vobradovich vobradovich changed the title feat: optimezed async-runtime (replace for gstd) feat: optimized async-runtime (replace for gstd) Oct 21, 2025
@github-actions
Copy link
Copy Markdown
Contributor

🔬 Benchmark Comparison

Benchmark Current Baseline Change Change % Status
compute 450_513_679_484 450_514_036_959 -357_475 -0.00%
alloc-0 563_780_574 564_376_739 -596_165 -0.11%
alloc-12 567_287_166 567_864_696 -577_530 -0.10%
alloc-143 726_655_761 727_298_127 -642_366 -0.09%
alloc-986 827_641_528 828_290_311 -648_783 -0.08%
alloc-10945 2_018_406_054 2_019_067_671 -661_617 -0.03%
alloc-46367 6_403_667_537 6_404_351_520 -683_983 -0.01%
alloc-121392 16_858_359_295 16_859_084_038 -724_743 -0.00%
alloc-317810 43_146_678_632 43_147_409_792 -731_160 -0.00%
counter_sync 637_172_916 678_859_589 -41_686_673 -6.14% 🚀
counter_async 803_743_595 851_480_134 -47_736_539 -5.61% 🚀
cross_program 2_238_138_550 2_436_719_419 -198_580_869 -8.15% 🚀
redirect 3_194_681_197 3_474_613_683 -279_932_486 -8.06% 🚀
stack_0 700_149_834 799_115_685 -98_965_851 -12.38% 🚀
stack_1 3_361_996_318 3_769_584_063 -407_587_745 -10.81% 🚀
stack_5 14_040_202_619 15_693_086_906 -1_652_884_287 -10.53% 🚀
stack_10 26_229_111_691 29_592_077_575 -3_362_965_884 -11.36% 🚀
stack_20 51_819_675_943 63_989_367_411 -12_169_691_468 -19.02% 🚀

Legend

  • 🚀 Significant improvement (>5% reduction)
  • 👍 Minor improvement (<5% reduction)
  • ✅ No significant change
  • ⚠️ Minor regression (<5% increase)
  • ❌ Significant regression (>5% increase)

🤖 This comment was automatically generated by the benchmark comparison workflow at aeaccca.

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Benchmark Comparison

Benchmark Current Baseline Change Change % Status
compute 450_513_679_484 450_514_036_959 -357_475 -0.00%
alloc-0 563_780_574 564_376_739 -596_165 -0.11%
alloc-12 567_287_166 567_864_696 -577_530 -0.10%
alloc-143 726_655_761 727_298_127 -642_366 -0.09%
alloc-986 827_641_528 828_290_311 -648_783 -0.08%
alloc-10945 2_018_406_054 2_019_067_671 -661_617 -0.03%
alloc-46367 6_403_667_537 6_404_351_520 -683_983 -0.01%
alloc-121392 16_858_359_295 16_859_084_038 -724_743 -0.00%
alloc-317810 43_146_678_632 43_147_409_792 -731_160 -0.00%
counter_sync 637_172_916 678_859_589 -41_686_673 -6.14% 🚀
counter_async 803_743_595 851_480_134 -47_736_539 -5.61% 🚀
cross_program 2_238_936_989 2_436_719_419 -197_782_430 -8.12% 🚀
redirect 3_194_681_197 3_474_613_683 -279_932_486 -8.06% 🚀
stack_0 700_149_834 799_115_685 -98_965_851 -12.38% 🚀
stack_1 3_361_996_318 3_769_584_063 -407_587_745 -10.81% 🚀
stack_5 14_040_202_619 15_693_086_906 -1_652_884_287 -10.53% 🚀
stack_10 26_229_111_691 29_592_077_575 -3_362_965_884 -11.36% 🚀
stack_20 51_819_675_943 63_989_367_411 -12_169_691_468 -19.02% 🚀

Legend

  • 🚀 Significant improvement (>5% reduction)
  • 👍 Minor improvement (<5% reduction)
  • ✅ No significant change
  • ⚠️ Minor regression (<5% increase)
  • ❌ Significant regression (>5% increase)

🤖 This comment was automatically generated by the benchmark comparison workflow at 5413c5a.

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Benchmark Comparison

Benchmark Current Baseline Change Change % Status
compute 465_523_553_267 465_521_292_356 +2_260_911 +0.00%
alloc-0 598_194_209 596_089_512 +2_104_697 +0.35%
alloc-12 601_635_117 599_460_876 +2_174_241 +0.36%
alloc-143 761_411_968 759_364_306 +2_047_662 +0.27%
alloc-986 864_097_354 862_362_378 +1_734_976 +0.20%
alloc-10945 2_214_636_039 2_216_616_777 -1_980_738 -0.09%
alloc-46367 6_544_099_901 6_541_997_330 +2_102_571 +0.03%
alloc-121392 17_170_526_475 17_168_433_902 +2_092_573 +0.01%
alloc-317810 43_907_840_502 43_905_750_055 +2_090_447 +0.00%
counter_sync 665_785_492 693_006_121 -27_220_629 -3.93% 👍
counter_async 829_606_982 863_104_002 -33_497_020 -3.88% 👍
cross_program 2_215_441_187 2_397_009_996 -181_568_809 -7.57% 🚀
redirect 3_197_138_740 3_471_987_506 -274_848_766 -7.92% 🚀
stack_0 705_592_615 799_415_299 -93_822_684 -11.74% 🚀
stack_1 3_392_136_301 3_778_945_524 -386_809_223 -10.24% 🚀
stack_5 14_168_220_708 15_738_223_846 -1_570_003_138 -9.98% 🚀
stack_10 26_478_961_103 29_542_694_740 -3_063_733_637 -10.37% 🚀
stack_20 54_514_692_122 66_032_420_478 -11_517_728_356 -17.44% 🚀

Legend

  • 🚀 Significant improvement (>5% reduction)
  • 👍 Minor improvement (<5% reduction)
  • ✅ No significant change
  • ⚠️ Minor regression (<5% increase)
  • ❌ Significant regression (>5% increase)

🤖 This comment was automatically generated by the benchmark comparison workflow at 897832b.

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Benchmark Comparison

Benchmark Current Baseline Change Change % Status
compute 465_525_935_187 465_521_292_356 +4_642_831 +0.00%
alloc-0 600_689_965 596_089_512 +4_600_453 +0.77%
alloc-12 604_170_814 599_460_876 +4_709_938 +0.79%
alloc-143 763_943_813 759_364_306 +4_579_507 +0.60%
alloc-986 866_629_199 862_362_378 +4_266_821 +0.49%
alloc-10945 2_217_167_884 2_216_616_777 +551_107 +0.02%
alloc-46367 6_546_631_746 6_541_997_330 +4_634_416 +0.07%
alloc-121392 17_173_094_409 17_168_433_902 +4_660_507 +0.03%
alloc-317810 43_910_408_436 43_905_750_055 +4_658_381 +0.01%
counter_sync 667_803_711 693_006_121 -25_202_410 -3.64% 👍
counter_async 831_625_201 863_104_002 -31_478_801 -3.65% 👍
cross_program 2_218_461_812 2_397_009_996 -178_548_184 -7.45% 🚀
redirect 3_199_897_684 3_471_987_506 -272_089_822 -7.84% 🚀
stack_0 705_318_790 799_415_299 -94_096_509 -11.77% 🚀
stack_1 3_391_069_123 3_778_945_524 -387_876_401 -10.26% 🚀
stack_5 14_163_980_118 15_738_223_846 -1_574_243_728 -10.00% 🚀
stack_10 26_470_753_748 29_542_694_740 -3_071_940_992 -10.40% 🚀
stack_20 54_498_551_237 66_032_420_478 -11_533_869_241 -17.47% 🚀

Legend

  • 🚀 Significant improvement (>5% reduction)
  • 👍 Minor improvement (<5% reduction)
  • ✅ No significant change
  • ⚠️ Minor regression (<5% increase)
  • ❌ Significant regression (>5% increase)

🤖 This comment was automatically generated by the benchmark comparison workflow at d1e81d4.

@github-actions
Copy link
Copy Markdown
Contributor

🔬 Benchmark Comparison

Benchmark Current Baseline Change Change % Status
compute 465_523_945_542 465_521_292_356 +2_653_186 +0.00%
alloc-0 598_700_320 596_089_512 +2_610_808 +0.44%
alloc-12 602_141_228 599_460_876 +2_680_352 +0.45%
alloc-143 761_918_079 759_364_306 +2_553_773 +0.34%
alloc-986 864_603_465 862_362_378 +2_241_087 +0.26%
alloc-10945 2_215_142_150 2_216_616_777 -1_474_627 -0.07%
alloc-46367 6_544_606_012 6_541_997_330 +2_608_682 +0.04%
alloc-121392 17_171_032_586 17_168_433_902 +2_598_684 +0.02%
alloc-317810 43_908_346_613 43_905_750_055 +2_596_558 +0.01%
counter_sync 653_485_763 693_006_121 -39_520_358 -5.70% 🚀
counter_async 818_743_175 863_104_002 -44_360_827 -5.14% 🚀
cross_program 2_198_786_808 2_397_009_996 -198_223_188 -8.27% 🚀
redirect 3_182_922_366 3_471_987_506 -289_065_140 -8.33% 🚀
stack_0 696_996_324 799_415_299 -102_418_975 -12.81% 🚀
stack_1 3_357_497_507 3_778_945_524 -421_448_017 -11.15% 🚀
stack_5 14_036_020_145 15_738_223_846 -1_702_203_701 -10.82% 🚀
stack_10 26_233_598_416 29_542_694_740 -3_309_096_324 -11.20% 🚀
stack_20 51_950_481_451 66_032_420_478 -14_081_939_027 -21.33% 🚀
noop_baseline 363_294_902 0 +363_294_902 +inf%

Legend

  • 🚀 Significant improvement (>5% reduction)
  • 👍 Minor improvement (<5% reduction)
  • ✅ No significant change
  • ⚠️ Minor regression (<5% increase)
  • ❌ Significant regression (>5% increase)

🤖 This comment was automatically generated by the benchmark comparison workflow at 9b98f77.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-benchmarks Enables running benchmarks in CI rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants