Articles  ❯  Optimization

Does the JVM eliminate allocations of temporary objects?

March 15, 2021

A Stack Overflow user was wondering if the JVM can eliminate the allocation of a temporary object by replacing it with an implicit static instance. Is the JVM “smart enough” to do so?

Does the JVM return memory to the OS?

January 24, 2021

Resource efficiency is a major concern when it comes to optimizing the performance and scalability of an application. In the Java world, one aspect that usually dominates resource concerns is memory usage - more specifically, the size of the Java heap.

Why does the JIT continually recompile the same method?

December 23, 2020

A Stack Overflow user noticed frequent recompilations, even after a substantial JVM uptime and couldn’t find an explanation based on the common knowledge on JIT compilers.

What makes a sequential write sequential on an HDD/SSD?

November 25, 2020

Logically, a single write can be seen as both, random and sequential, because it always affects a specific number of consecutive bytes. In case of synchronous and direct I/O, where writes are not delayed based on caching, the actual execution order and timing of writes are critical.

Why are sequential writes faster than random writes on an HDD/SSD?

September 13, 2020

The write performance of a disk is influenced by the physical properties of the storage device (e.g. the physical rotational speed in revolutions per minute in case of a mechanical disk), the disk I/O unit to I/O request size ratio and the OS/application.

Get in Touch