-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
785: Remove the lifetime constraint from the scope OP r=cuviper a=cuviper We already know the `OP` lifetime must outlive the `scope` call itself, and we'll execute it synchronously, but we don't need to tie that to the `'scope` lifetime. By relaxing this, we can create scopes for different lifetimes than `OP` can satisfy, even fully `'static`. They will still await completion by the end of the `scope` call, but this can be useful for collecting the invariant scopes from different contexts, as the new nested tests demonstrate (adapted from @pkolaczk's code in #782). 790: Micro-optimize the WorkerThread::steal loop r=cuviper a=cuviper This lifts up the loop for `Steal::Retry`, so we continue with other threads before trying again. For most benchmarks, the performance change is in the noise, but this gives a consistent improvement in most of the microbenches -- up to 8% faster on `join_microbench::increment_all_max`. 791: Use crossbeam_deque::Injector instead of crossbeam_queue::SegQueue r=cuviper a=cuviper `Injector` and `SegQueue` are _almost_ identical, down to the very same comments in their implementations. One difference is that `Injector` allocates its first block as soon as it's created, but `SegQueue` waits until its first `push`, which complicates it to allow being `null`. `Injector` also has methods to steal batches into a deque `Worker`, which might be useful to us. At the very least, this lets us trim a dependency. Co-authored-by: Josh Stone <cuviper@gmail.com>
- Loading branch information
Showing
8 changed files
with
204 additions
and
51 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.