Machine: MacBookAir, M4 chip with 10 cores.
If a test doesn't include certain crates, it means that the crate doesn't provide this kind of operation.
join: join 2 tasks, test how much time it takes and the cpu usage.
| item | tokio | rayon | micropool | chili | chili via par-core | single thread (inline(never) + black_box) |
|---|---|---|---|---|---|---|
| time (debug) | 3.19us | 8.95us | 1.41us | 0.029us | 0.87us | 0.0068us |
| cpu usage (debug) | 160% | 822% | 978% | 111% | 110% | 100% |
| time (release) | 0.44us | 11.5us | 1.05us | 0.0053us | 0.11us | 0.00045us |
| cpu usage (release) | 170% | 757% | 984% | 107% | 121% | 100% |
slice_add_assign: add assign on a very large u8 array.
| item | rayon | micropool | chili | chili (via par-iter & par-core) | single-thread |
|---|---|---|---|---|---|
| time (debug) | 0.68s | 2.42s | 1.16s | 1.53s | 2.53s |
| time (release) | 65ms | 110ms | 27ms | 27ms | 26ms |
spawn_cpu_usage: spawn empty task roughly every 1ms, see how much cpu is usaged (100% means 1 core is fully used) (lower is better):
| profile | tokio | rayon | micropool |
|---|---|---|---|
| debug | 5% | 60% | 21% |
| release | 3% | 11.6% | 16% |