How i can accurately compare the performance of js vs rust +wasm of the same implementation?

how i can accurately compare the performance of js vs rust +wasm of the same implementation?