Daninet / hash-wasm

Lightning fast hash functions using hand-tuned WebAssembly binaries
https://npmjs.com/package/hash-wasm
Other
881 stars 49 forks source link

After opening the console, the md5 calculation speed is greatly reduced #38

Closed kevinzhao2233 closed 2 years ago

kevinzhao2233 commented 2 years ago

I use the Demo provided in Readme.md for testing. If the page has not opened the console, the calculation speed is very objective, but once the console is opened, the calculation speed will be reduced by about 3 times.

You can open this example for testing.

Below is a screenshot of my test.

Don't open console ☟ image

Open the console ☟ image

Daninet commented 2 years ago

Yeah this is a known issue. Chrome disables certain JS/WASM optimizations when the Dev Tools are opened. It doesn't happen with Firefox. I also added some time ago a warning message to the benchmark page here: https://daninet.github.io/hash-wasm-benchmark/ I'm not sure what else could I do here. 🤔

kevinzhao2233 commented 2 years ago

It turns out that this is the case, it can only hope that chrome can optimize it.