RSSAmplifier

Blog

Random Notes and Cheat Sheets

A collection of notes on topics of interest

/index.html//RSS feed ↗10 posts

Latest posts

Nulling Out References Won't Help Your Garbage Collector

One of the misconceptions that I continuously run into is that nulling out references in Java helps garbage collection. This attitude is particularly prevalent from those developers used to C/C++ where delete ptr becomes ref = null . To be fair, it’s a reasonable thing to believe. It’s also wrong, and the way it’s wrong tells you most of what’s worth knowing about how a tracing collector actually…

Solution to a Puzzling Performance Puzzler

A Puzzling Performance Puzzler Spoiler Alert Two points before getting into this. First, my apologies to all those that sent me their solution that I wasn’t able to respond to. Second, I’d encourage you to make your own attempt at this puzzle before reading any further. What follows is my solution so don’t read any further. Spoiler alert, solution about to start. Last warning, now onto my…

A Puzzling Performance Puzzle

I was recently invited to speak at the Vancouver Java User Group https://www.linkedin.com/groups/14603101/. I proposed an AMA on performance tuning as in my experience, this turns a presentation into a group discussion which allows everyone to be engaged and that makes it more fun for everyone. The discussion in this session was mostly about methodology, or lack of it. I showed a chunk of code…

Allocation Disruption

Yesterday I had a long overdue catchup with a good friend. At one point the conversation drifted to the question, do we really learn from our failures? While conventional wisdom tells us that we learn more from our failures than from our successes, science tells us quite the opposite. Science also tells us that we learn just as much from the failures of others as we do from others success. How did…

Code Without Branching?

I started out today on my paddle board session by heading out into the wind. The reason for heading out into the wind is that it makes for an easier trip back. But, as we all know, winds will do as they please and on this day, they decided to change direction and stiffen. The wind got so strong that at times it seemed as if I wasn’t making any forward progress at all. But, I wasn’t worried as I…

Is your reported p99 wrong?

Last Thursday night/Friday morning I was out at a nearby beach on the Okanagan lake. As much as I wished the reason for being there was a late night party, what I and the others around me were engaged in was watching in horror as a gigantic wild fire jump up a cliff from behind a ridge line and then start dancing down the mountain. I don’t know how but fire fighters were able to stop the advancing…

How to cycle faster.

Just recently I’ve in conversations about cycling with a few talking to a few friends and colleagues. Inevitably the topics of how to improve performance, speed and climbing hills always comes up. My answer to any of these questions is that one should focus on spin rate rather than speed. TLDR; My goal is to spin in the range of 60-90 RPMs, aiming mostly towards 80. The trick is to use a gear that…

Pre ChatGPT(?) using SMIP Tables

I recently was cleaning out a filing cabinet when I ran across an article on SIMP tables dated June of 1975. The funny part of this article is that it was written as part of a series called “Department of Golden Oldies”. SMIP tables, also known as semantic tables, can be used to generate random sentences. These sentences look like they should have some meaning but are complete nonsense. When I…

ChatGPT Prompt Engineering for Performance Diagnostics

The use of AI in performance diagnostic work isn’t new. We used forms of AI at JClarity and continue to do so within the Java Engineering group inside Microsoft to develop a diagnostic engine. This engine is designed to automate the characterization of performance regressions. The big news is that with ChatGPT and Semantic Kernel, AI is much more accessible. The question that we’re currently…

Unified Logging Tag Sets in OpenJDK

As mentioned in my previous posting on Unified Logging (UL), messages will be associated with both a level and a tag set. The levels are trace, debug, info, warning , and error . Tags can be listed by running java -Xlog:help . The output from JDK 17 is listed here. add, age, alloc, annotation, arguments, attach, barrier, biasedlocking, blocks, bot, breakpoint, bytecode, cds, census, class,…