JVM JIT 101

Compared to other compilers, javac avoids a lot of optimizations when compiling java source code to bytecode. While “Ahead-Of-Time” (AOT) compilation can do more heavyweight analysis of the source code, a dynamic compiler can take into account runtime statistics like the most used paths (hotspots) and advanced chipset features (e.g. which CPU instruction sets are available).

Enter the “Just-In-Time” (JIT) compiler. That means over time, the behavior of what and how to compile bytecode to native code changes. Initially, most bytecode is actually just interpreted (tier 0) which is rather slow. Once a code path is “hot” enough, the C1 compiler kicks in (most of us know this by the -client flag). It is not as aggressive and allows for a faster initial startup. The C2 compiler (-server) uses more comprehensive analysis and is meant for long-running processes. Since Java 7, the JVM has used a compilation mode called tiered compilation which seamlessly switches between the modes based on application behavior.

Going Beyond Java 8: Feature Preview

According to some surveys, such as that of JetBrains, version 8 of Java is currently the most used by developers all over the world, despite being a 2014 release.

What you are reading is the first in a series of articles titled 'Going beyond Java 8,' inspired by the contents of my book 'Java for Aliens.' These articles will guide the reader step by step to explore the most important features introduced, starting from version 9. The aim is to make the reader aware of how important it is to move forward from Java 8, explaining the enormous advantages that the latest versions of the language offer.

Scala 2.13: Has Scala Done it Again?

The release of Scala 2.13 had been in the works for quite a long time, but it was finally released last month. With the release of this version, there are quite a few changes that Scala has brought for the users.
The intent of this post is to explain some of the features Scala has introduced/improved since its previous version.

In this article, we focus on new features that Scala 2.13 has in store for users and whether you should migrate to Scala 2.13. I'll try to summarize all related knowledge in this blog, including documentation and the release notes as well.