DEV Community

Discussion on: 9 tips to Increase your Java performance β˜•οΈ πŸš€ πŸšΆβ€β™‚οΈ

Collapse
 
ssimontis profile image
Scott Simontis

Some of these promote speed over legibility, which I think is a dangerous mindset. I try to make intentions clear when writing code, even if it isn't the fastest. If it appears to be an issue, I can then profile the code and research effective changes. Without realistic use cases, I don't think benchmarks are of any value...that's part of why we have so many JS performance issues today; the engines were designed to score well on benchmark tests that have little to do with real-world usage of the engine.

Collapse
 
sendilkumarn profile image
Sendil Kumar

Some of these promote speed over legibility

That is a vague statement. Have you read the first quote? I think that clearly specifies clean code is important.

I try to make intentions clear when writing code, even if it isn't the fastest.

This was exactly the point.

the engines were designed to score well on benchmark tests that have little to do with real-world usage of the engine.

The problem with JS performance are not due to engine. It is often because we do not know how this engine works. Irrespective of engine, if you are writing poly/mega-morphic code the performance will be slow. We have to understand that when writing. The engines are tuned for real life cases too but it is not possible to cover them fully.