# How to test performance of WASM vs Native?

**URL:** <https://forum.freecodecamp.org/t/how-to-test-performance-of-wasm-vs-native/428762>\
**Category:** General\
**Created:** [November 4, 2020, 4:17pm UTC](https://forum.freecodecamp.org/t/how-to-test-performance-of-wasm-vs-native/428762 "2020-11-04T16:17:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quickz](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/quickz/32/105441_2.png) [@Quickz](https://forum.freecodecamp.org/u/Quickz)\
**Post date:** [November 4, 2020, 4:17pm UTC](https://forum.freecodecamp.org/t/how-to-test-performance-of-wasm-vs-native/428762/1 "2020-11-04T16:17:19Z")

</div>

What would be the best way to go about testing performance of a piece of code written in Rust, C++ compiled to WebAssembly and then testing the same code natively?

To give some context, what I want to do is take a piece of code in one of the languages, run it on a Windows machine, then take that piece of code, compile it to WebAssembly and run it in a browser. And then compare the performance between the two - how fast did the code execute, how much RAM, CPU, GPU the computer ate etc.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:37pm UTC](https://forum.freecodecamp.org/t/how-to-test-performance-of-wasm-vs-native/428762/2 "2021-06-01T18:37:03Z")

</div>

Closed on June 1, 2021, 6:37pm UTC


