This commit addresses issue #9877 by implementing Promise.become() method that allows a Promise to be linked directly to a Fiber’s completion result, eliminating unnecessary allocations and callback indirection.

Key changes:

  • Added Promise.become(fiber) method that links promise to fiber completion
  • Optimized Promise.await() to handle LinkedToFiber state efficiently
  • Enhanced Promise internal state with LinkedToFiber case
  • Added comprehensive tests for the new functionality
  • Created benchmark examples demonstrating performance benefits

Performance improvement: When a fiber forks work and then waits on a Promise, the traditional approach creates async suspension + callback indirection. The new approach allows direct fiber-to-fiber linkage, reducing allocations and improving performance.

/claim #9877

Claim

Total prize pool $750
Total paid $0
Status Pending
Submitted October 22, 2025
Last updated October 22, 2025

Contributors

KA

Kallal Mukherjee

@7908837174

100%

Sponsors

ZI

ZIO

@ZIO

$750