Enjoy Newsletter #20.

Performance Improvements in JDK 24

This Inside.java article rounds up the most notable performance improvements in JDK 24 over JDK 23, organized by JDK bug tracker issue. In the core libraries, bulk operations in the Foreign Function & Memory API such as MemorySegment::fill, copy, and mismatch are now handled in pure Java when memory segments are small enough, avoiding the overhead of transitioning to native code via Unsafe. String concatenation now uses cacheable, reusable hidden classes instead of constructing chains of intermediate MethodHandle combinators; SHA3 digests are up to 27% faster by reducing conversions between byte and long arrays; and internal migrations to the new Class-File API have been tuned to minimize startup overhead.

At the runtime layer, JEP 491 allows virtual threads blocked inside a synchronized block to unmount from their carrier thread rather than pinning it, significantly improving scalability for code that uses synchronized. String::indexOf is roughly 1.3x faster on x64 platforms with AVX2. JEP 483 (Ahead-of-Time Class Loading & Linking), the first deliverable from Project Leyden, uses an AOT cache to cut startup time by around 42% in the article’s benchmark. JEP 450 introduces experimental 8-byte compact object headers, reducing memory footprint by 10–20% on typical workloads. Finally, the RISC-V port gained several new intrinsics including CRC32, Adler32, string comparison optimizations, and byte-reversal operations.

Clean your Memory: From Finalize to Cleaner

Stefano Fago explains that Java’s garbage collector (GC) only manages heap memory and does not automatically release external resources like sockets or file handles; mismanaging them can lead to resource leaks, gradual slowdowns, or crashes. The old approach was overriding finalize(), which has been deprecated because its execution timing is unpredictable, objects require at least one extra GC cycle to be reclaimed, accidental object resurrection can cause leaks, and the dedicated Finalizer thread is prone to contention. Its replacement is the Cleaner API, introduced in Java 9: under the hood, it uses PhantomReference and a background daemon thread while hiding the complexity of raw reference queues. You register an object alongside a cleanup action, and once the object becomes phantom-reachable, that action is enqueued to run on the background thread.

Cleaner pairs well with AutoCloseable: the close() method invokes clean() for immediate deterministic cleanup, while the Cleaner acts as a safety net. Even so, Fago stresses that Cleaner should only be a fallback when resources cannot be released via try-with-resources or an explicit close() call, since cleanup is asynchronous and carries background-thread overhead. When writing a cleanup action, avoid lambdas that capture fields through this, as doing so accidentally keeps a strong reference to the very object you want collected; cleanup logic should also be short and non-blocking, since multiple actions may share the same Cleaner thread pool.

5 Hidden Git Tips for Java Developers

On the Azul blog, Luqman Saeed walks through five underappreciated Git features beyond the everyday commit, push, and pull trio, with examples tailored to Java projects. First is git bisect: when you don’t know which commit introduced a bug, you mark the current commit as bad (git bisect bad) and an older working commit as good (git bisect good <commit-hash>), and Git performs a binary search by checking out midpoint commits for you to test until the culprit is found, finishing with git bisect reset. Next, git blame <file> shows who last modified each line and when (pass -L 50,60 to inspect a specific line range), giving you helpful context before debugging or refactoring. When you need to switch tasks mid-flight, git stash shelves uncommitted changes and git stash pop restores them; git stash list and git stash apply <stash-id> let you manage multiple stashes.

For temporary build artifacts generated by Maven or Gradle like .class files or the target/ directory, git clean -n previews what would be deleted, -f removes untracked files, -fd removes untracked directories as well, and -x also deletes ignored files such as .idea/. Finally, Git hooks are scripts that run automatically before or after events like commits, pushes, or merges—for example, a pre-commit hook in .git/hooks can run mvn test and abort the commit if tests fail. As a bonus tip, git checkout - jumps straight back to the previous branch you were working on without retyping its name, saving time and avoiding typos.

Simplify Your System by Challenging the Status-Quo and Learning from Other Ecosystems

In this InfoQ podcast, Max Rydahl Andersen—Distinguished Engineer at Red Hat and creator of JBang—recounts how taking a year away from Java helped him see upon returning that the ecosystem had accumulated too much accidental complexity, like “a thousand paper cuts”: each small feature is useful on its own, but together they become a burden. Quarkus, which he works on, flips traditional Java conventions by shifting most framework processing from runtime to build time, enabling near-instant startup. That speed unlocks a much better developer experience: live reload, continuous testing, Dev Services that automatically spin up containers like PostgreSQL or Kafka, and an interactive chat UI for testing AI services via LangChain4j right inside the Dev UI.

With JBang, he drew inspiration from Python and Node.js to let developers run Java from a single source file—even downloading a JDK automatically if none is installed; he jokes that if you find any development environment easier to set up, that’s a bug in JBang. Andersen also argues that AI cannot replace core software engineering fundamentals and systems thinking, and warns that AI will accelerate CVE exploitation, meaning legacy systems will need much more frequent patching. The overarching takeaway: challenge the status quo and borrow good ideas from other ecosystems to keep systems simple.

About “vibe coding”

Sorin Costea writes a brief reflection on “vibe coding”—the trend of letting AI write code in place of the developer. After reading “Vibe Coding vs Reality,” he was relieved to see he wasn’t the only skeptic, recounting his own attempt to use Cursor on a Java Maven project where the tool couldn’t even rename a class properly: first it renamed the class declaration without renaming the file, and when asked to fix it, it created an empty file with the new name—twice in a row.

When he shared the experience on Hacker News, the replies were mostly along the lines of “haha Java,” leaving him wondering whether Cursor was only trained on trendy frontend frameworks or whether its vocal fans simply don’t care about real-world enterprise codebases. He ended up uninstalling Cursor and feeling even more skeptical of “magical” AI coding tools, though he leaves the door open: “Next year though? Next year we’ll see.”

Visual-Focused Algorithms Cheat Sheet

Nick M compiles a visual-first cheat sheet of essential algorithms used in practice, following up on his earlier data structures cheat sheet; each algorithm is explained through everyday analogies and diagrams. The sorting section progresses from Selection Sort and Insertion Sort—simple but O(n²)—to Heap Sort and Merge Sort at O(n log n), Quick Sort with an O(n log n) average case and O(n²) worst case, and Tim Sort, the hybrid of Insertion Sort and Merge Sort used in Python and Java. Searching covers Binary Search at O(log n) alongside DFS and BFS for depth-first and breadth-first graph traversal. The graph section walks through Prim’s and Kruskal’s algorithms for minimum spanning trees, Dijkstra’s and Bellman-Ford for shortest paths (with Bellman-Ford handling negative edge weights), A* using heuristics, plus Union-Find and Ford-Fulkerson.

Later sections cover string search, data compression and encoding (Huffman coding, LZ compression, Fourier transforms, JPEG compression), optimization (Simplex, Simulated Annealing), machine learning and data science, and security and cryptography algorithms. The post wraps up with coding interview resources like “14 Patterns to Ace Any Coding Interview” and “5 Simple Steps for Solving Dynamic Programming Problems,” making it a handy reference for junior developers preparing for interviews.

Bonus: Interesting images from ByteByteGo

3 Steps to Master Your Software


This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.