rust-av / ssimulacra2_bin

Binary interface for the ssimulacra2 Rust port
BSD 2-Clause "Simplified" License
40 stars 10 forks source link

Disable ssimulacra2's rayon feature #35

Closed FreezyLemon closed 7 months ago

FreezyLemon commented 7 months ago

Closes #21.

We have our own threading mechanism, adding rayon on top of that is unnecessary and less efficient[^1].

This also makes the CPU usage a lot more predictable. Using -f 8 on a machine with 16 logical cores will show close to 50% CPU usage. With rayon, this was always more than expected (~70% in this example).

[^1]: On my two machines, normalizing for CPU usage will always result in higher FPS without rayon.

lu-zero commented 7 months ago

Sounds good, could you please open an issue so we can investigate if we can improve rayon later?

FreezyLemon commented 7 months ago

@lu-zero Can you explain what you mean? The rayon feature in ssimulacra2 isn't bad or anything, but we have a better threading mechanism in this crate

lu-zero commented 7 months ago

Ideally we can make so the rayon in the crate library cooperates better with downstream crates from what you found out :)

FreezyLemon commented 7 months ago

I see. I opened rust-av/ssimulacra2#18