1
Fork 0

Improve performance of spsc_queue and stream.

This commit makes two main changes.
1. It switches the spsc_queue node caching strategy from keeping a shared
counter of the number of nodes in the cache to keeping a consumer only counter
of the number of node eligible to be cached.
2. It separate the consumer and producers fields of spsc_queue and stream into
a producer cache line and consumer cache line.
This commit is contained in:
Joshua Lockerman 2017-09-29 15:58:11 -04:00
parent 0e6f4cf51c
commit 68341a91ee
5 changed files with 207 additions and 98 deletions

View file

@ -244,6 +244,7 @@
#![feature(allow_internal_unstable)]
#![feature(align_offset)]
#![feature(asm)]
#![feature(attr_literals)]
#![feature(box_syntax)]
#![feature(cfg_target_has_atomic)]
#![feature(cfg_target_thread_local)]
@ -290,6 +291,7 @@
#![feature(prelude_import)]
#![feature(rand)]
#![feature(raw)]
#![feature(repr_align)]
#![feature(repr_simd)]
#![feature(rustc_attrs)]
#![cfg_attr(not(stage0), feature(rustc_const_unstable))]