ZettaScaleLabs / stabby

A Stable ABI for Rust with compact sum-types
Other
314 stars 12 forks source link

Fast Futures #10

Open p-avital opened 1 year ago

p-avital commented 1 year ago

Right now, the only stabby future is either fully stable, but allocates on each poll, or fully unsafe.

Let's make a BlessedCompilerFuture trait that uses CompilerVersion to mark the futures as stable for a given version of the compiler

p-avital commented 1 year ago

Another way futures could be made faster is by storing the latest used waker next to the boxed future, and reusing it if it will_wake the new context's waker when the future is polled again. But I'm not sure how to implement that without forcing the user to write more code yet...

p-avital commented 1 year ago

stabby's handling of Futures is now as fast as I think I can make it without Rust's stdlib allowing stable wakers to exist. Working on getting that through.