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="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.string/2.3.3/underscore.string.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/sugar/1.4.1/sugar.min.js"></script>
_.mixin(_.str.exports());
var sprintfTemplate = 'Hello, %1$s, %2$s and %3$s',
sprintfValue1 = 'Joe',
sprintfValue2 = 'Richard',
sprintfValue3 = 'Larry',
templateTemplate = 'Hello, <%= name1 %>, <%= name2 %> and <%= name3 %>',
templateValue = {
name1: 'Joe',
name2: 'Richard',
name3: 'Larry'
},
sugarTemplate = 'Hello, {1}, {2} and {3}',
sugarValue1 = 'Joe',
sugarValue2 = 'Richard',
sugarValue3 = 'Larry';
Ready to run.
Test | Ops/sec | |
---|---|---|
Underscore.string sprintf() |
| ready |
Lo-Dash template() |
| ready |
Sugar assign() |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.