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
Some tests after reading the stackoverflow question Create GUID / UUID in Javascript
<script>
/**
* Fast UUID generator, RFC4122 version 4 compliant.
* @author Jeff Ward (jcward.com).
* @license MIT license
* @link http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136
**/
var JeffWard=function(){var e={};var t=[];for(var n=0;n<256;n++){t[n]=(n<16?"0":"")+n.toString(16)}e.generate=function(){var e=Math.random()*4294967295|0;var n=Math.random()*4294967295|0;var r=Math.random()*4294967295|0;var i=Math.random()*4294967295|0;return t[e&255]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[n&255]+t[n>>8&255]+"-"+t[n>>16&15|64]+t[n>>24&255]+"-"+t[r&63|128]+t[r>>8&255]+"-"+t[r>>16&255]+t[r>>24&255]+t[i&255]+t[i>>8&255]+t[i>>16&255]+t[i>>24&255]};return e}()</script>
<script>
function Briguy37(){var e=(new Date).getTime();var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+Math.random()*16)%16|0;e=Math.floor(e/16);return(t=="x"?n:n&3|8).toString(16)});return t}
</script>
<script>
function broofa(){ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e=="x"?t:t&3|8;return n.toString(16)})}
</script>
var guid;
Ready to run.
Test | Ops/sec | |
---|---|---|
Jeff Ward |
| ready |
Briguy37 |
| ready |
broofa |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.