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
Constructs similar high-level objects, wrapped around an array of element references
Point is that you can't match the example My Library pattern (or performance) with jQuery as jQuery has only one way to retrieve element references.
Also, jQuery is using QSA (not doing any real work) to run the query. This is a bad state of affairs as QSA is not compatible with jQuery's legacy query code (not even close). QSA also requires a lot of feature testing (which jQuery does not have) to avoid cross-browser issues.
<script src="//www.cinsoft.net/mylib099-min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
var toArray = API.toArray; // NOTE: No optimization in core toArray
var getEBTN = API.getEBTN; // One missing link in jQuery
var myQuery;
var myjQuery;
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
My Library |
| ready |
jQuery |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.