Hacker News new | ask | show | jobs
by vtempest 3614 days ago
This isn't good advice. jQuery will get those variables just as fast. You're really splitting hairs just for the sake of criticizing. http://www.stoimen.com/blog/2010/06/19/speed-up-the-jquery-c... Basic developers should not care about such minor differences and write code they can read & maintain. $("") stands out as a DOM element, and who wants to add an extra line for variables -- unneeded and tedious. Most developers should not have to worry "oops did i cache declare everything beforehand" or act as ifs a bad coding practice that 'takes points' in the final code
1 comments

Have you even read the article you linked to? Maybe you should read the comments on the article as well...

I've experienced this in many web apps, which had major benefit from these changes. The same applies to managed code (C#), where just being mindful about how and what you write, makes everything faster.