Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
In one of my posts, I made 2 + 2 equal to 5 using Java 21. In summary, the Integer class in Java has a cache for values from -128 to 127. I manipulated these values by swapping the number 4 with 5. This made me ponder the importance of this cache and its impact on a program. So, I decided to conduct a test using JMH, which is a micro benchmark API.
This article is based on the Software Mistakes and Tradeoffs book by Tomasz Lelek and Jon Skeet. There is an old computer science saying that Premature Optimization is the root of all evil. The saying has stuck around because it’s accurate for a lot of use cases. Without any input data about expected traffic and SLA, it’s hard to reason about your code and its required performance. Optimizing random paths in code in such a situation is like shooting in the dark.
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.