3 ms·
Thank you, you saved me the hassle of writing a very annoyed rant. Here's a performance tip: learn how to measure your damn code in the context of the website,
by vanderZwan 9y ago
Thank you, you saved me the hassle of writing a very annoyed rant.
Here's a performance tip: learn how to measure your damn code in the context of the website, because the JIT depends on heuristics that involve the context of the whole code.
Open website -> Open Dev Tools -> Performance -> Do Stuff for a reasonable amount of time.
Then you can actually reason about what causes the bottleneck based on the numbers. If you're on Chrome, you can even look at the source code after using the performance tab for a while, and see a line-by-line breakdown of where most of the time was spent, and find the hot path down to the individual expression or statement. Fix real bottlenecks, not hypothetical ones.