Benchmark - Both methods are executed 10 times for measurement.

Execution takes some time.

WebAssembly

JavaScript