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
event.layerX
& event.layerY
will be removed from WebKit soon. Every jQuery-bound event handler now logs this warning:
event.layerX
andevent.layerY
are broken and deprecated in WebKit. They will be removed from the engine in the near future.
Screenshot:
See jQuery bug #10531.
It’s possible to prevent jQuery from copying these properties over to its event objects, but what is the fastest way of doing this?
These snippets don’t do exactly the same, but they all have a similar effect: the layerX
and layerY
properties aren’t copied to jQuery event
objects anymore.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script>
var props = $.event.props;
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
join, replace, and split |
| ready |
Using $.map |
| ready |
while loop + delete |
| ready |
while loop + new array |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.