The Set-to-List Shuffle: A Hidden Performance Tax

I am sure if you are reading this blog post, you have used Java collections a lot, and of course, you must have used Java Sets. The most common scenario, or rather the default reflex, is to go for a…

I am sure if you are reading this blog post, you have used Java collections a lot, and of course, you must have used Java Sets. The most common scenario, or rather the default reflex, is to go for a…

In our previous post, we discussed some advanced spinlock mechanisms in Java. We explored the advantages and drawbacks of popular spinning mechanisms, from the simple Test-And-Set (TAS) and cache-aware Test-Test-And-Set (TTAS), to fairness-oriented Ticket locks, and finally the scalable queue-based…
In any multicore system, threads will compete for shared data. If two threads modify the same memory simultaneously, it leads to data corruption. To resolve these race conditions, we use mutual exclusion (mutex), in which only one thread is allowed…
Ever since the introduction of Java Streams, a lot of everyday loop code moved into stream pipelines. Streams are very readable and provide a rich set of operations for transforming data. And for large datasets, the performance difference between a…