jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
Compares the PBKDF2 methods of the Stanford Javascript Crypto Library with the ones from CryptoJS and Anandam.
<script src="http://anandam.name/pbkdf2/sha1.js"></script>
<script src="http://anandam.name/pbkdf2/pbkdf2.js"></script>
<script src="https://crypto.stanford.edu/sjcl/sjcl.js"></script>
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/pbkdf2.js"></script>
<script>
// from http://stackoverflow.com/questions/3745666/
function hex2a(hex) {
var str = '';
for (var i = 0; i < hex.length; i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
return str;
}
var iterations = 1000;
var password = 'password';
var hexSalt = '29EEE7AA9C0E9315';
var keySizeBits = 512;
var sjclSalt = sjcl.codec.hex.toBits(hexSalt);
var cryptoSalt = CryptoJS.enc.Hex.parse(hexSalt);
var anandamSalt = hex2a(hexSalt);
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
SJCL 0.8 |
| ready |
CryptoJS 3.1.2 |
| ready |
Anandam 1.5 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.