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
<div id="memberProfile"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://raw.github.com/jquery/jquery-tmpl/master/jquery.tmpl.min.js"></script>
<script type="text/html" id="tmplUser">
<div class="user" style="overflow:hidden;">
<h1>${firstName} ${lastName}</h1>
{{if premium}}
<b style="float:right;">Premium User!</b>
{{/if}}
<h2>Order History</h2>
<div class="orders">
{{each orders}}
${$value.number}
${$value.title}
{{if premium}}
<a href="premiumReturn.html">Return free</a>
{{else}}
<a href="return.html">Return (you pay shipping)</a>
{{/if}}
<br/>
{{/each}}
</div>
</div>
</script>
<script>
var data = [{
firstName: "Amy",
lastName: "Apple",
premium: true,
userID: 9999000,
orders: [{
number: 321,
title: "Mule Variations"
},
{
number: 543,
title: "Library Nation"
}]
},
{
firstName: "Benjamin",
lastName: "Brown",
premium: false,
userID: 9999001,
orders: [{
number: 432,
title: "Hissing Fauna Are You the Destroyer"
},
{
number: 76,
title: "The Long March"
}]
},
{
firstName: "Chelsea",
lastName: "Chesterfield",
premium: false,
userID: 9999002,
orders: [{
number: 98,
title: "Myths of the Near Future"
}]
},
{
firstName: "Daphne",
lastName: "Dobbins",
premium: true,
userID: 9999003,
orders: [{
number: 12,
title: "This is Hardcore"
},
{
number: 765,
title: "In Rainbows"
}]
},
{
firstName: "Eddie",
lastName: "Eastman",
premium: true,
userID: 9999004,
orders: [{
number: 323,
title: "Bone Machine"
}]
}];
var templateString = document.getElementById("tmplUser").innerHTML;
$.template("savedTmpl", templateString);
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
use the template |
| ready |
build a string |
| ready |
build an array |
| ready |
compiled(?) template |
| ready |
html insertion |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.