Vanilla Java
Understanding how Core Java really works can help you write simpler, faster applications.
Java / JVMPerformance / optimizationAI / MLEngineering blogs
- Posts
- 385 from 2 May 2010 to 12 Sep 2026
- Posting
- now and then (4 in the last year)
- Kind
- personal blog
- Feed
- http://blog.vanillajava.blog/feeds/posts/default
2026 4
2025 9
- Updated Biography
- Improving the prompt to the AI to get better code
- Asking multiple AI to optimise the same code
- Practical Considerations for Advancing AI Collaboration in Software Development
- A Functional intreface can extend other interfaces
- Hands-On Career: The Evolution of a Java Champion
- Does AI-Generated Documentation Have Value?
- Generative AI and the Reverse Baltimore Phenomenon
- Prompt Engineering for AIDE
2024 33
- Next-Level Development: Harnessing AI with AIDE
- Empowering Your Annotations with Fields
- Dates aren't what they used to be
- The AI Trough
- AI on a Hype Cycle
- What might an AI System Prompt look like?
- Demystifying Java Object Sizes: Compact Headers, Compressed Oops, and Beyond
- Novel Uses of Core Java for Low-Latency and High-Performance Systems
- Trivially Copyable Objects in Java
- Efficient Distributed Unique Timestamp Identifier Generation
- A Java Conversion Puzzler: Understanding Implicit Casting and Overflow
- Why Does Math.round(0.49999999999999994) Round to 1?
- TLDR: Designing Hyper-Deterministic, High-Frequency Trading Systems
- Performance Tip: Specify Collection Capacity When Size is Known
- Performance Tip: Rethinking Collection.toArray(new Type[0])
- Storing 1 TB in Virtual Memory on a 64 GB Machine with Chronicle Queue
- Unveiling Floating-Point Modulus Surprises in Java
- Thread Safety Issues with Vector and Hashtable
- Exceptional Exception, StackTrace extends Throwable
- StringBuffer is Dead, Long Live StringBuffer
- What can make Java code go faster, and then slower?
- Overly Long Class Names in Java or Geeky Poem?
- Unexpected Full GCs Triggered by RMI in Latency-Sensitive Applications
- How SLOW can you read/write files in Java?
- Advanced Applications of Dynamic Code in Java
- Two Overlooked Uses of Enums in Java
- How to avoid using a Triple Cast
- Calculating an Average Without Overflow: Rounding Methods
- Why double Still Outperforms BigDecimal: A Decade-Long Performance Comparison
- Incomparable Puzzles in Java
- Ten Java Myths and Misconceptions
- Java Arrays, Wat!
- Some Common Java Gotchas and How to Avoid Them
2022 11
- Java is Very Fast, If You Don’t Create Many Objects
- Comparing Approaches to Durability in Low Latency Messaging Queues
- Event-Driven Order Processing Program
- Efficient Memory Mapping for Terabyte Sparse Files in Java
- Event Driven Hello World Program
- How Behaviour Driven Development Works Well with Event Driven Architectures
- The More You Say, the Less People Remember The Fewer the Words, the Greater the Profit
- Nine Core Java Questions
- Eight Core Java Questions
- Benchmarking Kafka vs Chronicle for Microservices: which is 750 times faster?
- Distributed Unique Time Stamp Identifiers
2021 3
2017 13
- Reviewing Exception Handling
- Distributing common java apis
- Modelling microservice patterns in code
- Simple asynchronous microservices using
- Microservices are about applying group
- Bad string we have program here that
- A jdbc gateway microservice deep dive
- Microservices in chronicle world part 5
- Microservices in chronicle world part 4
- Microservices in chronicle world part 3
- Microservices in chronicle world part 2
- Microservices in chronicle world part 1
- Micro services for performance
2016 17
- Hubpress now has RSS support.
- Goldilocks Microservices
- Talks on performant microservices, exception handling and documentation driven development.
- Distributing Common Java APIs
- Modelling Microservice Patterns in Code
- Simple Asynchronous Microservices using Lambda Architecture
- Microservices are about applying a group of Best Practices
- Bad String abuse
- An Interveiw on my talk for Low Latency Microservices at QCon New York
- Turning JDBC into a Micro Service
- Low latency Microservices
- Micro-services for performance
- Moving to Github and Asciidoc
- Printing arrays by hacking the JVM.
- Simple Event Driven design
- How do low latency applications differ for regular applications?
- StackOverflow Q&A you should read if you program in Java
2015 27
- Some reviews of my JavaOne 2015 talks
- My Bio
- Common misconception: How many objects does this create?
- Low latency FIX engine in Java
- Custom operators for collections in Java
- An introduction to optimising a hashing strategy
- Chronicle Journal - Customizable Data Store
- Half priced Gold support.
- What does Chronicle Software do?
- Managing your application as a file system
- What do AIs have to talk about?
- Comparing Hashing strategies
- Upcoming presentations
- Using JSON in a low latency environment
- Wiring YAML to a file or network with Chronicle Wire.
- Using YAML over the network.
- Accessing Chronicle Engine via NFS
- Is using Unsafe really about speed or functionality?
- Using JMH to find the fastest way to encode/decode UTF8
- How and Why to Serialialize Lambdas
- Puzzler: nested computeIfAbsent
- What are the bad features of Java.
- Inconsistent operation widen rules in Java
- Java 8 Optional is not just for replacing a null value
- micro-timing
- Mixing memory unit messages
- Java Lambdas and Low Latency
2014 27
- On heap vs off heap memory usage
- Chronicle Map and Yahoo Cloud Service Benchmark
- Essentialism and Technology
- A Java conversion puzzler, not suitable for work (or interviews)
- Kafka Benchmark on Chronicle Queue
- Men in Tech
- lambdas and side effects.
- An Inconvenient Latency
- Try optimising the memory consumption first
- Team training in Expert Core Java
- Compounding double error
- If BigDecimal is the answer, it must have been a strange question.
- Adding @atomic operations to Java
- Making operations on volatile fields atomic.
- Classes in the JLS 8
- MineCraft and off heap memory
- Making Unsafe safer
- SharedHashMap vs Redis
- Uncomparable puzzles in Java
- Chronicle and low latency in Java
- Common Java Myths
- Java arrays, Wat!?
- Common gotchas in Java
- Hardware Transactional Memory in Java, or why synchronized will be cool again.
- sun.misc.Unsafe and off heap memory
- Hiring a Java Analyst Developer
- Interview: Starting out as an IT Consultant.
2013 36
- Why we shouldn't use more threads than we need to
- Computing units don't have to be confusing
- Unique hashCodes is not enough to avoid collisions.
- Interning in High Frequency Trading systems
- Writing and Testing High Frequency Trading Engines talk at JavaOne
- Update on Writing and Monitoring HFT systems
- Tutorial on writing and monitoring low latency, high throughput systems in Java.
- C++ like Java for low latency
- How do I calculate the remainder for extremely large exponential numbers using Java?
- OpenHFT Java Lang project
- ext4 slower than tmpfs
- Micro jitter, busy waiting and binding CPUs
- Easy to add but hard to remove
- High resolution timings without the custom hardware
- Plans for Chronicle 2.0
- The Java version of patenting the Wheel
- Exercise to understand double.
- Presentation on; Using BigDecimal and double
- First talk posted online
- Is it better to use immutable or mutable values in multi-threaded systems
- A very interesting expert panel
- Performance Java User's Group (redo)
- First Performance Java User's Group meeting
- Why a synchronized StringBuffer was never a good idea
- Low GC Coding: Efficient listeners (exercise)
- Lies, statistics and vendors
- Simplifying low latency services
- Low latency services
- Chronicle and the Micro-Cloud
- Performance Java Training Details
- Performance Java Training
- Java is dead (again)
- A down side of durable messaging
- High Performance Durable Messaging
- Java Memory Model and optimisation.
- Should Java be more high level or low level?
2012 57
- Can synchronization be optimised away?
- Local variables inside a loop and performance
- Object resurrection
- Over one million page views
- A use for overflow
- Performance of inlined virtual method invocations in Java
- When using direct memory can be faster
- Wasting time by saving memory
- Why is it not allowed in Java to overload Foo(Object…) with Foo(Object[])?
- Practical uses for WeakReferences
- Why Double.NaN==Double.NaN is false
- Java Intrinsics and Performance
- Java += and implicit casting
- Moving the decimal place in a double
- Can try/finally prevent a StackOverflowError?
- Hidden code
- String intern puzzle
- Map interface and equals()
- Java memes which refuse to die
- Uses for special characters in Java code
- Odd practices in Java
- My first article in Oracle Magazine
- What is latency, throughput and degree of concurrency?
- yield(), sleep(0), wait(0,1) and parkNanos(1)
- Why Math.round(0.499999999999999917) rounds to 1 on Java 6
- EOL Date for Java 6
- Complexity of Time
- Art of Programming
- Quotes relating to System Design
- Adding code to an annotation
- Presentation on Using Shared Memory in Java
- Different results summing a double[]
- Benchmarking a slow machine
- Attending the LJC QCon London Meeting.
- Magazine layout appears to increase page views
- File local access
- How much difference can thread affinity make
- High performance libraries in Java
- Using Java 7 to target much older JVMs
- Ultra low latency Event Store
- "Java Sucks" revisited
- Demonstrating when volatile is required
- Another Shifty Challenge
- Shifting Challenge
- Unsigned Challenge
- Java Thread Affinity support for ExecutorService
- Java Thread Affinity support for hyper threading.
- Surprising results of autoboxing
- Java Thread Affinity supports groups of threads.
- Generating every combination without duplicates
- Project Euler
- Generic class names to avoid
- Top Java Article of 2011
- String.valueOf(int) vs "" + int
- An odd case of initialization
- Java Puzzler, double chars
- Regex vs IndexOf in Java.
2011 136
- Happy New Year all
- Using a memory mapped file for a huge matrix
- Thread Affinity library for Java supports JNA
- What skills should a Core Java Developer have?
- Solution: What is this broken code doing
- What is this broken code doing
- Solutions: Testing an Anagram of a Palindrome
- synchronized is slower but not worth worrying about
- DZone adds page view summary.
- Java Interview Question; Anagram of a Palindrome
- Thread Affinity library for Java.
- Java Puzzle operator confusion
- Java puzzle System.exit and locks.
- Test a complete failure of the JVM
- Java puzzle, low latency queue
- Low Latency Slides
- Ever decreasing cost of main memory
- Stupid performance trick in Java
- Java puzzle (Single threaded client server)
- Java puzzle (Sum of even Fibonacci numbers)
- How arbitary is the start of System.nanoTime()?
- Why Concurrency examples are confusing
- Recycling objects to improve performance
- Serialization using ByteBuffer and recycled objects
- Serialization benchmarks and charts
- Strine translator
- Randomly not so random
- Java plus
- HugeCollections moved to github
- New Contributors to HugeCollections
- Forum for ideas
- The Exchanger and GC-less Java
- Is making Boost more like Java a good idea?
- Memory alignment in C, C++ and Java
- Why thread priority rarely matters
- Order of elements in a hash collection
- The importance of innovation
- Java can be significantly faster than C
- MethodHandle performance in Java 7
- Added Memory Mapped support to HugeCollections
- Writing to stdin
- Avoiding Java Serialization to increase performance
- Generating ASCII Banners
- Double your money again
- Why testing code for thread safety is flawed
- Collections Library for millions of elements
- Tuning buffer sizes
- Comparing Collections speeds
- Reading/writing GC-less memory
- 50,000 pages views last month
- A collection with billions of entries
- Should server applications limit themselves to 4 GB?
- Strange Hello World in Java
- Comparing Java 7 Async NIO with NIO.
- Using tmpfs to speed up "disk" access
- Synchronized vs Lock performance
- C++ or Java, which is faster for high frequency trading?
- How fast are Java Datagrams?
- Why are the keys of a Map in a jumbled order
- Size of an entry in a Map
- Send XML over a Socket fast
- How fast are Java sockets
- Java: How much memory do different arrays consume
- Java and Memory Leaks
- Java: What is the limit to the number of threads you can create?
- Java: Getting the size of an Object
- 30,000 hits last month.
- Incorrect Core Java Interview Answers
- Java Secret: Generated methods
- Java low level: Converting between integers and text (part 2)
- Java low level: Converting between integers and text (part 1)
- Java: All about 64-bit programming
- Human Readable vs Machine Readable Formats
- 20000 hits last month.
- Low GC in Java: Using primitives
- World's first commercial quantum computer
- New toy for home
- Low GC in Java: Use primitives instead of wrappers
- Java Secret: Loading and unloading static fields.
- 15,000 hits last month.
- Java Secret: Are static blocks interpreted?
- Being as fast as possible is a bad idea
- Java Secret: What is called before main.
- Java Secret: More uses for varargs
- Queues with Threads to be avoided.
- 4000 hits today.
- Java Secret: Using an enum to build a State machine.
- Java Insanity: Two methods with the same super.method()
- Java Secrets: Using ExecutorService to run many background tasks.
- How to avoid Garbage Collection
- Java Secret: Labels as an Anti-Pattern
- Java Secret: Double Brace Initialization
- Java Secret: InheritableThreadLocal
- Java Secret: LRU cache in Java.
- Are String, Date, Method immutable?
- Bugs: Don't use new StringBuilder(char)
- Best Practice: Don't use equals(null)
- Best Practice: Don't create instances of Utility classes.
- Bugs: Don't use co-variant equals and compareTo
- Best Practices: Don't make the finalize() method public.
- Performance Tip: Avoid creating an Object to convert between a primitive and String.
- Performance Tip: Avoid using String + inside a StringBuilder.append()
- Performance Tip: Avoid using a String when char will do.
- Performance Tip: Avoid String operations which don't do anything.
- Performance Tip: Use StringBuilder instead of String for a non constant field.
- Performance Tip: System.arrayCopy is usually faster than a manual array copy.
- Performance tip: If you want to iterate over the keys and values use entrySet()
- Performance Tip: Use static fields and classes.
- PeformanceTip: Pre-compile your patterns
- Performance Tip: Don't use StringBuilder for compile time constants.
- Performance Tip: Avoid "" + x to convert to a String.
- Performance Tip: Set the capacity of a collection is you know its size.
- Performance Tip: Use String.intern() correctly.
- Performance Tip: avoid Collection.toArray(new Type[0])
- A review of some old best practices
- Common tricks to optimising Java with examples from the JDK
- Writing human readable data faster than binary.
- How long does throwing an Exception take?
- Linkedin Group for Core Java Performance Professionals
- Does Thread.stop() really stop a Thread?
- When the JIT gets it wrong
- Forgotten feature of LinkedHashMap.
- How to get C like performance in Java
- Special non-exceptions.
- StringBuffer is dead, long live StringBuffer
- What can make Java code go faster and slower.
- Improving Java support for 64-bit.
- Tasks to test your Java concurrency skills.
- Creating Dangling Pointers in Java
- A history of "Java is Dead"
- With generics, the return type is part of the method signature.
- float has a use after all.
- Don't type 2.2250738585072012e-308 in java.
- Memory was cheap but now its cheaper.
- Using unsigned values in Java
- How *slow* can you read/write files in Java?
2010 12
- More uses for dynamic code in Java.
- Two uses for enum most people forget.
- Gotcha: Save on objects and get more Full GCs.
- Java NIO is faster than Java IO for Sockets
- Stupidly long class name or a geeky poem?
- Memory is cheaper than you think.
- Fastest way to lock/synchronize objects.
- OMG: Using a triple cast.
- Calculating an average.
- Monotonically increasing time
- Accuracy of double representation for decimals.
- Locking a ConcurrenthashMap for exclusive access.