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
cow
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
$(document).ready(function(){ //$('#main').load('view/student.php'); //return false;
$('select').html('
<option>
select
</option>
'); //#header #login $('#header #login').click(function(){ //logout if($(this).html()=='Logout'){
myData=new Object(); myData['sender']='logout'; rData=sendData(myData,'post'); if(rData.reply==1){
$(this).html('Login'); $('#main').load('view/offline.php'); clearInterval(messageUpdate);
} return false; } $('#loginDialog').find('input[type=button]').button(); $('#loginDialog').attr('title','Login
User').dialog({position: [730,90],width: 240,resizable: 'false'}); }); //#activateAccount
$('#activateAccount').click(function(){ $('#activateButton').button(); $('#activateAccountDialog').attr('title','Activate
Account').dialog({width: 230,show: 'scale',hide: 'scale',resizable: 'false'}); });
$('#activateAccountDialog select[name=courseId]').focus(function(){ $(this).html('
<option>
wait..
</option>
'); myData=new Object(); myData['table']='course'; myData['sender']='getAll'; rData=sendData(myData,'get');
html=''; $.each(rData.data,function(key,val){ html+='
<option value="'+val.id+'">
'+val.courseName+'
</option>
'; }); $(this).html(html); }); //activate account $('#activateAccountDialog #activateButton').click(function(){
myData=new Object(); myData['sn']=$('#activateAccountDialog input[name=sn]').val();
myData['courseId']=$('#activateAccountDialog select[name=courseId]').val(); myData['studentName']=$('#activateAccountDialog
input[name=studentName]').val(); myData['sender']='activateAccount'; rData=sendData(myData,'get');
if(rData.status==1){ $('#activateAccountOk #activateOk').button().click(function(){
myData=new Object(); myData['sn']=$('#activateAccountDialog input[name=sn]').val();
myData['user']=$('#activateAccountOk input[name=user]').val(); myData['pass']=$('#activateAccountOk
input[name=pass1]').val(); myData['sender']='setUserPass'; myData['table']='student';
myData['type']=1; myData['id']=rData.id; rData2=sendData(myData, 'post'); alert(rData2.reply);
}); $('#activateAccountOk').hide().fadeIn(); } }); //login $('#loginDialog input[type=button]').click(function(){
$(this).delay(5000); //alert('test');return false; myData=new Object(); myData['user']=$('#loginDialog
input[name=user]').val(); myData['pass']=$('#loginDialog input[name=pass]').val();
myData['sender']='login'; rData=sendData(myData,'get'); if(rData.online==1){ msg='
<p>
Account already login.. If you believe this is an error, you can make this offline
by providing your 2nd password..
</p>
'; msg+='
<table>
'; msg+="
<tr>
<td>
2nd Password:
</td>
<td>
<input type='password' name='pass2'>
</tr>
"; msg+="
<tr>
<td align='right' colspan='2'>
<input type='button' value='Confirm'>
</td>
</tr>
"; msg+="
</table>
<br>
<span id='reply'>
</span>
"; $('#fixOffline').html(msg).attr('title','Account Status').dialog({resizable:
'false'}); $('#fixOffline').find('input[type=button]').button().click(function(){
myData['pass2']=$('#fixOffline input[name=pass2]').val(); myData['sender']='fixOffline';
rData3=sendData(myData,'post'); reply=''; if(rData3.reply=='success'){ reply='Account
is now offline.. you may now re-login..'; }else{ reply='Wrong password'; } $('#fixOffline
#reply').html(reply).hide().fadeIn().delay(800).fadeOut(); }); return false; } if(rData.type==1){
myData2=new Object(); myData2['type']='student'; myData2['user']=myData['user'];
myData2['sender']='session'; myData2['online']=true; rData=sendData(myData2,'post');
if(rData.id!=null){ $('#main').load('view/student.php'); $('#loginDialog').dialog('close');
$('#header #login').html('Logout'); } } }); }); function sendData(myData,type){ rData=new
Object(); $.ajax({ url: 'control/sendData.php', type: type, dataType: 'json', data:{myData:myData},
success: function(data){ rData=data; }, async: false }); return rData; }
Ready to run.
Test | Ops/sec | |
---|---|---|
fish |
| ready |
cow |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.