Expand description
Utility methods to spawn a number of scoped threads equals to the number of cores on the machine. Unlike normal threads, scoped threads can borrow data from their environment.
Structsยง
- Intentionally force alignment to 128 bytes to make a best effort attempt to place each atomic on its own cache line. This reduces contention and improves performance for common CPU caching protocols such as MESI.
Functionsยง
- pack ๐
- Spawn
n
scoped threads, wheren
is the available parallelism. - Spawns
n
scoped threads that each receive a work stealing iterator. Work stealing is an efficient strategy that keeps each CPU core busy when some items take longer than other to process, used by popular libraries such as rayon. Processing at different rates also happens on many modern CPUs with heterogeneous performance and efficiency cores. - threads ๐
- unpack ๐