Comparison of performance impact for anonymous functions with JavaScript variable versus local named functions.

# On Count Var|Half|Ggl full, sec run, sec eval, sec file size, bytes render, sec Browser Urls
0 500 Each Fun Local 0.256 0.251 0.243 51383 0.005 Chrome/3.0 script
1 250 Half Fun Local 0.251 0.243 0.215 51383 0.008 Chrome/3.0 script
2 500 Each Var Local 0.333 0.299 0.327 53383 0.034 Chrome/3.0 script
3 250 Half Var Local 0.244 0.236 0.486 53383 0.008 Chrome/3.0 script
4 500 Each Fun Global 0.179 0.024 0.075 51387 0.155 Chrome/3.0 script
5 250 Half Fun Global 0.216 0.021 0.081 51387 0.195 Chrome/3.0 script
6 500 Each Var Global 0.195 0.027 0.11 53387 0.168 Chrome/3.0 script
7 250 Half Var Global 0.123 0.018 0.041 53387 0.105 Chrome/3.0 script
total functions > 6500
total time, sec 7.553
prerendered static files: 500 | 1000 | 3000 | 10000

Goal is to compare timing on similar set of functions(named and anonymous) for:

Additional requirements:

Sources:

index.jsp - this file | AnonymousJsVsNamed.js.jsp - JS rendering JSP
© Sasha Firsov, 2010