-
Subzero Coroutines: Use ultra-low-level marl APIs · c346653bBen Clayton authored
Instead of using the `marl::Event` synchronization primitives, drop all the way down to using `marl::Scheduler::Fiber` APIs directly, and use the new `marl::Scheduler::Fiber::wait()` function that does not take a lock. Provides around another 2x performance boost: ``` go run ./third_party/marl/tools/cmd/benchdiff/main.go pre.json post.json Delta | Test name | (A) pre.json | (B) post.json -2.08x -81.186µs | Coroutines/Fibonacci/iterations:512 | 156.202µs | 75.016µs -2.10x -668.201µs | Coroutines/Fibonacci/iterations:4096 | 1.275069ms | 606.868µs -2.11x -5.359326ms | Coroutines/Fibonacci/iterations:32768 | 10.166126ms | 4.8068ms -2.12x -10.342µs | Coroutines/Fibonacci/iterations:64 | 19.585µs | 9.243µs -2.13x -2.784542745s | Coroutines/Fibonacci/iterations:16777216 | 5.251299045s | 2.4667563s -2.13x -347.220746ms | Coroutines/Fibonacci/iterations:2097152 | 653.812928ms | 306.592182ms -2.14x -43.615678ms | Coroutines/Fibonacci/iterations:262144 | 82.017312ms | 38.401634ms ``` Bug: b/145754674 Change-Id: I5f6b0c8c92af645cc2a825c6f1e2769b2440638e Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42850Tested-by:
Ben Clayton <bclayton@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
c346653b
×