Re:Google Closure: How not to write JavaScript
by kwamenum86 on Monday December 13, 2010 @01:27AM
(#1999588)
For js running in a browser this does not matter but on a server this will make a huge difference.
[ Parent
| on HN ]
Re:Google Closure: How not to write JavaScript
by jrockway on Monday December 13, 2010 @01:35AM
(#1999603)
How many 50 million element arrays do you have?
My guess is that this makes no difference in real life. Should you write clean code that performs well? Yes. But should you be fixated on a tiny bug in Google's library? Nope. Send patch, get .0000000001 seconds per element back, and move on.
Re:Google Closure: How not to write JavaScript
by kwamenum86 on Monday December 13, 2010 @11:09PM
(#2003087)
It's not about a single 50mil element array. It's about sub-optimal code running in a bunch of places and it adds up. But in any case this probably won't be the bottleneck.
Still I am a fan of running the most optimal code possible on the server. Absolutely no reason not to.
Client-side js is different. Often times algorithmic optimizations have no impact (unless we are talking about animation.)
I would not trust people who do not respect optimizations like these to run code on my server.