Modify Cargo.toml and turn off rayon by disabling default features: ssimulacra2 = { version = "=0.3.1", default-features = false }
Try using video mode with and without default-features = false with different -f X values.
For me, there is a point where ssimu2 with rayon enabled is actually slower than the same without rayon: -f 3 and higher.
I suspect this is due to contention on either memory on cache from the rayon threads (activating rayon almost triples my CPU usage for a given -f! with not even 20% perf increase even in -f 1), but I can't say for sure. Given that the binary interface supports a better mode of threading, I'd suggest actually disabling the rayon feature here if this can be reproduced across the board.
A simple test:
git checkout main
Cargo.toml
and turn off rayon by disabling default features:ssimulacra2 = { version = "=0.3.1", default-features = false }
video
mode with and withoutdefault-features = false
with different-f X
values.For me, there is a point where ssimu2 with rayon enabled is actually slower than the same without rayon:
-f 3
and higher.I suspect this is due to contention on either memory on cache from the rayon threads (activating rayon almost triples my CPU usage for a given
-f
! with not even 20% perf increase even in-f 1
), but I can't say for sure. Given that the binary interface supports a better mode of threading, I'd suggest actually disabling the rayon feature here if this can be reproduced across the board.