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>
function getParameterByName(name) {
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}
$('button').on('click', function() {
var id = $(this).attr('id');
var idn = $(this).attr('id').substring(0,2);
var idb = $(this).attr('id').substring(2,3);
var baArray = new Array("Standy","Heizprogramm 1","Heizprogramm 2","Heizprogramm 3","Heizbetrieb","Absenkbetrieb");
if (idn != 'se' && idn != 'Se') {
if (idn != 'ba' && idn != 'BA' ) {
max=30;min=5;
var ist = parseFloat($('#'+idn).html());
if (idb == 'd') {
if (ist>min) { if (idn == 'SH' || idn == 'sh') {var soll = ist-0.1;} else {var soll = ist-0.5;} var res=soll.toFixed(1)};
}
if (idb == 'u') {
if (ist<max) { if (idn == 'SH' || idn == 'sh') {var soll = ist+0.1;} else {var soll = ist+0.5;} var res=soll.toFixed(1)};
}
$('#'+idn).text(res);
} else {
var ist = $('#'+idn).html();
if (idb == 'd') {
var i = 1;
while (i < baArray.length) {
if (baArray[i] == ist) {
var j = i-1;
$('#'+idn).text(baArray[j]);
break;
}
i++;
}
}
if (idb == 'u') {
var i = 0;
while (i < (baArray.length-1)) {
if (baArray[i] == ist) {
var j = i+1;
$('#'+idn).text(baArray[j]);
break;
}
i++;
}
}
}
}
});
$("#Send").click(function(e){
$.post( "/app/ebusread.php", { ID:"set", stat:"1",rt:$('#RT').html(), as:$('#AS').html(), ba:$('#BA').html(), sh:$('#SH').html(),adr:getParameterByName('adr')}, function( data ) {
$('#RT').text(data.rt);
$('#AS').text(data.as);
$('#SH').text(data.sh);
$('#BA').text(data.ba);
$('#infoset').html('<div class="alert alert-success alert-dismissible" style="position:absolute;top:190px;left:40px;right:40px;background-color: rgba(223, 240, 216, 0.8);"><button type="button" class="close" data-dismiss="alert" aria-label="Schließen"><span aria-hidden="true">×</span></button><h1 style="margin-top:0px;margin-bottom:0px;"><i class="fa fa-info"></i> Daten gespeichert.</h1></div>');
}, "json");
});
$("#send").click(function(e){
$.post( "/app/ebusread.php", { ID:"set", stat:"1",rt:$('#rt').html(), as:$('#as').html(), ba:$('#ba').html(), sh:$('#sh').html(),adr:getParameterByName('adr')}, function( data ) {
$('#rt').text(data.rt);
$('#as').text(data.as);
$('#sh').text(data.sh);
$('#ba').text(data.ba);
$('#infoset').html('<div class="alert alert-success alert-dismissible" style="position:absolute;top:190px;left:40px;right:40px;background-color: rgba(223, 240, 216, 0.8);"><button type="button" class="close" data-dismiss="alert" aria-label="Schließen"><span aria-hidden="true">×</span></button><h1 style="margin-top:0px;margin-bottom:0px;"><i class="fa fa-info"></i> Daten gespeichert.</h1></div>');
}, "json");
});
function read() {
$.post( "/app/ebusread.php", { ID:"set",stat:"0" ,adr:getParameterByName('adr')}, function( data ) {
$('#RT').text(data.rt);
$('#AS').text(data.as);
$('#SH').text(data.sh);
$('#BA').text(data.ba);
$('#rt').text(data.rt);
$('#as').text(data.as);
$('#sh').text(data.sh);
$('#ba').text(data.ba);
}, "json");
}</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
diy |
| ready |
minified |
| ready |
original |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.