machine
Generated Rust API reference for byte_engine.
byte_engine / core / machine
Module machine
Facts about the machine the process runs on, for sizing parallel work.
Quick Reference
| Item | Kind | Description |
|---|---|---|
performance_parallelism | fn | Returns the number of hardware threads on the machine's fastest cores. |
Functions
performance_parallelism
fn performance_parallelism() -> usizeDefined in crates/byte-engine/src/core/machine.rs:14-20
Returns the number of hardware threads on the machine's fastest cores.
Many processors pair a few fast cores with slower ones. Work that every lane has to finish before the next
stage starts, such as an Alley::execute_phased algorithm, runs
at the pace of its slowest lane, so it should use no more lanes than this. When the cores are all alike, or the
operating system does not tell them apart, this is every hardware thread available to the process.
Apple silicon reports its performance cores. On Linux, the count comes from the kernel's lists of hybrid cores or its per-core capacities. Other systems report every hardware thread.