Re:Three JavaScript performance fundamentals that make Blueb...
by tlarkworthy on Monday September 05, 2016 @05:18PM
(#12432284)
Profilers help identify hot spots, but don't really explain the dynamic behaviour of why something is a hot spot. So comments saying that something is O(n^2) when it could be O(n) is very helpful when you see the inner function hogging 90% of resources. Profilers don't get complexity classes.
[ Parent
| on HN ]
Re:Three JavaScript performance fundamentals that make Blueb...
by mattmanser on Tuesday September 06, 2016 @10:12AM
(#12436125)
Not really, comments like this are often wrong or misleading. After all, the programmer hasn't actually tested anything, they're just making assumptions. Otherwise they'd have actually fixed it.
It's just pointless noise.
A profiler will tell you that a particular function was run 10,000 times costing 0.5ms per run. You're not going to have a problem tracking down the problem, the comment won't help.