| ▲ | bawolff 4 hours ago | ||||||||||||||||
Shouldnt browser also have it implemented in c? Like i assume crypto.subtle isnt written in js. | |||||||||||||||||
| ▲ | drum55 4 hours ago | parent [-] | ||||||||||||||||
It doesn't matter if your hottest loop is using string comparisons, as another poster pointed out in C you aren't even doing the majority of the second hash because you know the result (or enough of it) before finishing it. The JavaScript version just does whole hashes and turns them into a Uint8Array, then iterates through it. | |||||||||||||||||
| |||||||||||||||||