Skip to content

Instantly share code, notes, and snippets.

@chnbohwr
Created June 25, 2018 08:51
Show Gist options
  • Save chnbohwr/ed862da796e4b6971edb07c513c1bdbf to your computer and use it in GitHub Desktop.
Save chnbohwr/ed862da796e4b6971edb07c513c1bdbf to your computer and use it in GitHub Desktop.
const sha256 = require('sha256');
const arrayCount = 2000000;
console.time('single thread');
Array.from(Array(arrayCount)).map(() => sha256(Math.random().toString()));
console.timeEnd('single thread');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment