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>
<script src="http://masonry.desandro.com/jquery.masonry.js">
</script>
<script src="http://local.fashiolista.com/fashiolista_media//js/original/jquery.masonry.js">
</script>
var pages = [
[],
[],
];
var preRnd = [0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1,
0, 0, 0, 0,0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 2, 0, 0, 2,
0, 0];
var colors = ['red', 'blue', 'green'];
var sizes = [[20, 20], [40, 40], [40, 60]];
for(var p=0; p<pages.length; p++) {
for(var i=0; i<5; i++) {
var rnd = preRnd[i];
pages[p].push($('<div class="item">').css({
backgroundColor: colors[rnd],
width: sizes[rnd][0] + 'px',
height: sizes[rnd][1] + 'px',
float: 'left'
}).html(i)[0]);
}
pages[p] = $(pages[p]).filter('.item');
}
$('#container').remove();
Ready to run.
Test | Ops/sec | |
---|---|---|
Masonry default |
| ready |
Masonry local 1 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.