JVM GC Benchmarks (1997)

Java microbenchmarks for the JDK 1.1 garbage collector — object allocation rates, finaliser cost, and the difference between short- and long-lived objects.

javajvmperformance

JVM GC Benchmarks (1997)

Microbenchmarks for the JDK 1.1 GC. Run with -verbose:gc to observe collection behaviour.

Contents

  • AllocationBenchmark.java — short-lived vs long-lived object allocation
  • StringConcatBenchmark.java+ vs StringBuffer GC pressure
  • ObjectPoolBenchmark.java — pool vs alloc/GC trade-off
  • FinalizerCostBenchmark.java — cost of finalize() on object death
  • run.sh — runs all benchmarks with GC logging enabled

Running

javac -d build src/**/*.java
bash run.sh

Look for [Full GC ...] lines in the output — that is the stop-the-world pause.