- A good algorithm is the most important thing when it comes to fast performance.
- Write less code
- Every line of code involves a choice, and if there is a choice between two simple, straightforward ways of programming, choose the more performant one.
- Bugs and Performance Issues Aren’t Limited to the JVM
- Ockham's razor is a principle from philosophy.
- Suppose there exist two explanations for an occurrence. In this case the simpler one is usually better.
- Another way of saying it is that the more assumptions you have to make, the more unlikely an explanation is.
- Test a Real Application
- The first principle is that testing should occur on the actual product in the way the product will be used.
- Microbenchmarks
- A microbenchmark is a test designed to measure a very small unit of performance.
- e.g. the time to call a synchronized method versus a nonsynchronized method
- Microbenchmarks may seem like a good idea, but they are very difficult to write cor‐ rectly.
- A microbenchmark is a test designed to measure a very small unit of performance.
- Macrobenchmarks
- Mesobenchmarks