Contended locks explained – a performance approach

Follow @ionutbalosin Context Improving the performance of contended Java object monitors was added in JDK 9 as part of the JEP 143. However, as JEP 143 states, it might not be an overall performance gain on every benchmark or every test, but rather it explores few areas related to contendedContinue reading… Contended locks explained – a performance approach

An even faster way than StackWalker API for asynchronously processing the stack frames

Follow @ionutbalosin Context StackWalker API has been introduced in JDK 9 as part of JEP 259. It targets a flexible mechanism to traverse and materialize the required stack frames allowing efficient lazy access to additional stack frames when required. Before this API (i.e. until JDK 9), there were a fewContinue reading… An even faster way than StackWalker API for asynchronously processing the stack frames

Getting the stack trace versus throwing an Exception. What is common and what is different

Follow @ionutbalosin Motivation At the first glance these two things (e.g. getting the stack traces and throwing an exception) might seem very unrelated, however, they are quite similar up to a certain extent in the way they behave under the hood. Current article aims to reveal such similarities and differences.Continue reading… Getting the stack trace versus throwing an Exception. What is common and what is different

Loop invariant code motion pitfall in JDK10

Follow @ionutbalosin Current article illustrates a corner case in regards to loop invariant code motion optimization in JDK10, which at first glance seems to regress in comparison to JDK9. Such optimization tries to move outside the body of a loop statements or expressions which do not depend on the loopContinue reading… Loop invariant code motion pitfall in JDK10

Parallel streams behave sequentially up to a certain extent

Follow @ionutbalosin In this post, I would like to spotlight a bit of the internal behavior of parallel streams in Java, a feature added in JDK 8. I will start from the source code and then try to explain what really happens in the context of our test example. Basically,Continue reading… Parallel streams behave sequentially up to a certain extent

Variable vs Fixed Parameters Method Call

Follow @ionutbalosin In this article I would like to reveal the differences and what happens under the hood between a variable parameters method and the same version but with fixed number of parameters, from a performance standpoint. In regards to that I wrote a small program which tests the responseContinue reading… Variable vs Fixed Parameters Method Call

Shared Variable Optimization Within A Loop

Follow @ionutbalosin Recently I attended GeeCon Krakow conference and during one of the talks the famous Venkat Subramaniam shared an interesting small application which captured my attention and got stuck in my mind. Going home, I have decided to zoom into the problem and to better understand what happens under theContinue reading… Shared Variable Optimization Within A Loop

How to Measure Performance in Java Applications

Follow @ionutbalosin Performance is an important criterion every software application might satisfy and each Architect should have in mind when designing and putting in place the Quality Attribute tactics, if this is an important ASR (Architectural Significant Requirement). Sometimes it becomes really hard to tune and improve a mature and complexContinue reading… How to Measure Performance in Java Applications