Java Performance Chapter 1 Introduction

O'Reilly Japan -Java Performance Summary of Chapter 1 of this book

Chapter 1 Introduction --Qiita ← This article Chapter 2 Performance Testing Approach -Qiita ← Next article Chapter 3 Java Performance Toolbox -Qiita Chapter 4 How the JIT compiler works -Qiita Chapter 5 Basics of Garbage Collection -Qiita

This book describes two things: setting up the JVM and using a good standard API.

Overall picture of performance

Write a better algorithm

Ultimately, performance depends on the adequacy of your code. No matter how much you try to loop the code, the code that looks for a specific element can't beat the code that uses HashMap.

Reduce the amount of code

Some administrators still evaluate developers with the amount of code they write, A small amount of code is often more advantageous in terms of performance. This tendency seems to be strong especially in Java.

The more code you have to compile, the more time it takes for the JIT compiler to run the code faster. As the amount of objects that must be created and discarded increases, so does the amount of GC work. Keeping a lot of objects will extend the GC cycle. The more classes you load, the more time you have to start. As the size of the code executed increases, it may not fit in the cache.

Performance always deteriorates. Because functions will be added.

Premature and easy optimization

About 97% of the day should forget about trivial efficiency. Premature optimization is the root of all evil.

There is a famous word. You should write clean and straightforward code to make it easier to read, It should not be optimized without analysis (correction that complicates the structure at the cost of performance advantage). But avoiding code that is obviously a performance issue is another issue, and that's good.

Look outside (database is always a bottleneck)

For standalone applications that don't use external resources, the only performance bottleneck is that application. However, when using external resources, that becomes a bottleneck. In this book, we will explain Java performance assuming that the analysis is done not only for Java but for the whole.

Optimize for common cases

Focus on frequent use cases.

Recommended Posts

Java Performance Chapter 1 Introduction
Java Performance Chapter 3 Java Performance Toolbox
Java Performance Chapter 2 Performance Testing Approach
[Java] Introduction
Java Performance Chapter 5 Garbage Collection Basics
Effective Java Chapter 2
Effective Java Chapter 6 34-35
[Java] Introduction to Java
Introduction to java
Effective Java Chapter 4 15-22
Effective Java Chapter 3
Deep Learning Java from scratch Chapter 1 Introduction
Introduction to Java Web Apps Performance Troubleshooting
Java Performance Chapter 4 How the JIT Compiler Works
Java app performance tuning
Introduction to java command
45 Java Performance Optimization Techniques (Part 1)
I started Java Gold (Chapter 1-1)
[Java] Introduction to lambda expressions
Understanding Java Concurrent Processing (Introduction)
[Java] Introduction to Stream API
[Introduction to rock-paper-scissors games] Java
Introduction to swift practice output Chapter5
100% Pure Java BDD with JGiven (Introduction)
[Introduction to Java] About lambda expressions
[Introduction to Java] About Stream API
Let's use Twilio in Java! (Introduction)
Introduction to Functional Programming (Java, Javascript)
Effective Java 3rd Edition Chapter 5 Generics
Java
Initial introduction to Mac (Java engineer)
Effective Java 3rd Edition Chapter 8 Methods
Server processing with Java (Introduction part.1)
Java
GraalVM for Java Performance (Windows Developer Build)
Java container performance degradation in Menicoa environment
Introduction to java for the first time # 2
Introduction to swift practice output Chapter 5 Part 2
Introduction to algorithms with java --Search (depth-first search)
[Introduction to Java] How to write a Java program
[Java] Is reflection really heavy? Performance comparison
[Read Effective Java] Chapter 2 Item 7 "Avoid Finalizers"
Note: next ・ nextLine (paiza learning Java introduction 9: # 06)
Introduction of New Generation Java Programming Guide (Java 10)
Output of the book "Introduction to Java"
Learning for the first time java [Introduction]
Deep Learning Java from scratch Chapter 2 Perceptron
Introduction to monitoring from Java Touching Prometheus
[Introduction to Java] Variable declarations and types
Effective Java 3rd Edition Chapter 9 Program General
Introduction of New Generation Java Programming Guide (Java 11)
Introduction of New Generation Java Programming Guide (Java 12)
Introduction to algorithms with java --Search (breadth-first search)