tested on Pixel 4a with ~250MB file and took 1800ms https://codepen.io/hzrd149/full/wvbMqPz
Discussion
hashing really isn't that expensive an operation on modern hardware
Depends on the hash. SHA256 is fast.
i use an AVX2 SIMD version in my code also... i've tested it and it's more than 10x as fast as a standard CPU version
blake2 and blake3 are both very fast as well but my point still stands, it's not an expensive operation and is really an essential operation now, and it's something that javascript execution environments should provide, all of these hash functions, they are the current secure hashes, md5, SHA1, toast.
That's not bad!
This comes in very handy for something I need to build, too. Ideally with a blossom server but for me the point of hashing is to check if the file already exists on the server prior to the upload.