[JAVA] About HotSpot VM

What is this article?

A story about a programmer who is not familiar with the inside of Java and investigated HotSpot VM

Background

--Investigate the internal implementation of String --@HotSpotIntrinsicCandidate <-What? Temee …… --It seems that something called HotSpot VM is related, so check it

Roughly speaking

HotSpot VM: JVM that implements HotSpot HotSpot: Oracle's JVM Acceleration Description

To summarize very roughly, "Technology that caches frequently used parts and speeds up Java execution"

Experience shows that a small number of processes are often called, and others are rarely called (for example, 20% of all processes occupy 80% of the execution time). Therefore, it seems that if you cache 20% of it, it will be faster.

A little more detail

When executing Java, Java code written by humans is converted into bytecode (JVM language), and the JVM language is interpreted by the JVM interpreter and the program is executed. Without HotSpot, the JVM interprets the Java code in the heap area one by one and executes the process, but this has the problem of slow processing speed. When the same bytecode is called many times by the JVM, HotSpot compiles that part into machine language and caches it. In this way, the processing of frequently called parts of the program is speeded up.

For details, see the following reference articles

https://www.atmarkit.co.jp/fjava/special/jvmhistory/jvmhistory01.html https://www.atmarkit.co.jp/ait/articles/0403/11/news096.html https://ja.wikipedia.org/wiki/HotSpot

Recommended Posts

About HotSpot VM
About =
About method.invoke
About attr_accessor
About Hinemos
About inheritance
About params
About Docker
About Rails 6
About form_for
About Spring ③
About enum
About polymorphism
About Optional
About hashes
About JitPack
About Dockerfile
About this ()
About devise
About encapsulation
About Docker
About JAVA_HOME
About active_hash
About static
About exceptions
About scope
[Maven] About Maven