Nested Named Functions
JavaScript performance comparison
Preparation code
<script>
function foo(a, b) {
function bar() {
return a + b;
}
return bar();
}
function foo2(a, b) {
return bar2(a, b);
}
function bar2(a, b) {
return a + b;
}
function foo3(a, b) {
function bar(x,y) {
return x + y;
}
return bar(a,b);
}
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
Test | Ops/sec | |
---|---|---|
Optimized (No Nesting)
|
|
pending… |
Nested Function
|
|
pending… |
Nested Function w/ Params
|
|
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.
- Revision 3: published gdsf
- Revision 4: published
- Revision 5: published gdsf
- Revision 6: published
- Revision 7: published
- Revision 9: published
- Revision 10: published
- Revision 13: published
- Revision 14: published
- Revision 15: published
- Revision 16: published
- Revision 17: published
- Revision 18: published
- Revision 19: published
- Revision 20: published
- Revision 21: published
- Revision 22: published
- Revision 23: published
- Revision 24: published max jooher
- Revision 30: published Digitale Welten
- Revision 31: published Digitale Welten
- Revision 33: published
- Revision 38: published
- Revision 44: published ggbg
- Revision 45: published
- Revision 46: published ggbg
- Revision 47: published ggbg
- Revision 49: published
- Revision 50: published ggbg
- Revision 51: published ggbg
- Revision 53: published
0 Comments