Skip to content
Javascript hash implementations tested for speed. Including SHA-256, MD5, CRC32, SHA3, BLAKE2S
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
hash-implementations
jspm_packages
libs
README.md
computed_c720.html
config.js
hash-implementations.js
index.html
main.js
package.json

README.md

The goal is to find a JavaScript hash implementation that is both light and fast. The JavaScript is considered to be run in the browser. The hash implementations are tested for speed by hashing the source code of JavaScript libraries.

Tested are implementations for following Hash Functions

  • SHA-256
  • SHA-3
  • MD5
  • CRC32
  • blake2s

Of all tested SHA-256 implementations, results with an Intel Celeron 2955U @ 1.4GHz suggests that forge is the fastest SHA-256 JavaScript implementation. Even though the original source code weights 284 KB, extracting the code related to SHA-256 reduces the size to 4.5 KB, see https://github.com/brillout/forge-sha256.

Run the tests

Go to http://brillout.github.io/test-javascript-hash-implementations/ and wait a bit.

Other benchmarks

You can’t perform that action at this time.