window access
JavaScript performance comparison
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script>
Benchmark.prototype.setup = function() {
var r = [],
win = window;
function local() {
return win.$.fn.jquery;
}
function global() {
return window.$.fn.jquery;
}
function absent() {
return $.fn.jquery;
}
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
local window |
|
pending… |
global window |
|
pending… |
absent window |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by Stoyan
- Revision 2: published by pajta
- Revision 3: published
- Revision 4: published
- Revision 5: published by onur
0 comments