On Thu, Mar 10, 2022 at 09:14:07PM +0100, Paolo Bonzini wrote: > On 3/10/22 18:42, Stefan Hajnoczi wrote: > > There are a lot of details to decide on in the translator tool and > > runtime to optimize the code. I think the way the stack frames are > > organized in this patch series is probably for convenience rather than > > performance. > > Yes, sometimes the optimizations are there but mostly because they made my > job easier. > > > Out of curiousity, did you run the perf tests and compare against > > ucontext? > > Not quite voluntarily, but I noticed I had to add one 0 to make them run for > a decent amount of time. So yeah, it's much faster than siglongjmp.
That's a nice first indication that performance will be good. I guess that deep coroutine_fn stacks could be less efficient with stackless coroutines compared to ucontext, but the cost of switching between coroutines (enter/yield) will be lower with stackless coroutines. Stefan
signature.asc
Description: PGP signature