I am writing a new framework that can extend the Unity game engine to use Rust and Wasm. I am testing the ECS with specs crate. I am amazed to find that wasm32-unknown-unknwon with wasmtime runs faster than x86_64-pc-windows-msvc. I tried to change the profile.release.opt-level, there are no good news. The default setting is better. Any explanation about this?
32-bit memory, same way x32 is often faster than x64 (see https://en.wikipedia.org/wiki/X32_ABI )
Soni L. said:
32-bit memory, same way x32 is often faster than x64 (see https://en.wikipedia.org/wiki/X32_ABI )
If this is true, I should observe that target i686-pc-windows-msvc is faster than x86_64-pc-windows-msvc, but it is not.
The result is i686 fps is 370, x86_64 fps is 410.
Hoping White said:
If this is true, I should observe that target i686-pc-windows-msvc is faster than x86_64-pc-windows-msvc, but it is not.
The result is i686 fps is 370, x86_64 fps is 410.
that's because i686 has a bunch of other things that make it slower, such as fewer registers, a terrible calling convention (passes all arguments in memory by default), no built-in pc-relative addressing, etc.
The best results during testing were with the 181.mcf SPEC CPU 2000 benchmark, in which the x32 ABI version was 40% faster than the x86-64 version.
This data is quite close to my test results, my test results are 130FPS for wasm32, and around 100FPS for x86_64. Thank you all for the explanation.
Last updated: Dec 23 2024 at 12:05 UTC