Google Web perfomance initiative.

Gogle initiates a really great project recently: Let’s make the web faster
So Optimizing JavaScript code article got in scope of my interest.
Conclusions:

  • use [<string>,<string>,<string>].join(“”) for string concatenation (* this is pretty well known rule)
  • use prototype method defining rather than defining method inside closure
  • Creating a closure is significantly slower then creating an inner function without a closure, and much slower than reusing a static function.

By the way – in the last one “significantly” means(lower is better)
for Chrome2: 20:10:1
for FireFox3: 500:50:1
for IE6: 2:2:1
I think this is really significantly:)

This entry was posted in post and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>