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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
function ajax( uri, settings ) {
var ajax = new window.XMLHttpRequest(),
data = settings.type == 'GET' ? '' : settings.data,
async = settings.async ? settings.async : true;
uri = settings.type == 'GET' ? uri + ( settings.data ? '?' + settings.data : '' ) : uri;
ajax.onreadystatechange = function () {
if ( ajax.readyState == 4 ) { //response ready
if ( ajax.status == 200 ) { //success
if ( settings.success ) settings.success( ajax.responseText, ajax.statusText );
if ( settings.complete ) settings.complete( ajax, ajax.statusText );
} else {
if ( settings.error ) settings.error( ajax, ajax.status, ajax.statusText );
};
};
};
ajax.open( settings.type, uri, async );
if ( settings.headers ) {
for ( var header in settings.headers ) {
ajax.setRequestHeader( header, settings.headers[header] );
};
};
ajax.send( data );
};
Ready to run.
Test | Ops/sec | |
---|---|---|
$.ajax GET |
| ready |
custom ajax GET |
| ready |
$.ajax POST |
| ready |
ajax POST |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.