Profiling wasm code?

  1. I’m a big believer that the greatest performance increase is from “not working” to “working.” As a result, I’ll often do a fast-to-implement-but-slow-to-run code just to get something working – and if it’s a bottleneck, I can rewrite the code later.

  2. However, I’m currently dealing with doing Rust/Wasm/WebGL code. The code needs to be fast enough to be interactive – and I can’t figure out how to profile wasm code.

  3. Is there anyway to profile Rust/Wasm code? If not, for those writing Rust/Wasm code, how do you deal with lack of profiler?

  4. To add: the Rust/Wasm code is running in a browser (Chrome, Firefox) – so I need some profiling solution where I can profile in Chrome/Firefox, then get the dump translated back to which Rust function spent how much time.

https://duckduckgo.com/?q=wasm+rust+profiler :wink:

https://rustwasm.github.io/docs/book/game-of-life/time-profiling.html
https://rustwasm.github.io/docs/book/reference/time-profiling.html

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.