Skip to content

Instantly share code, notes, and snippets.

@magicwerk
magicwerk / CallSitePerformance.java
Last active August 19, 2022 12:27
Example uses JMH to analyze performance of different implementations using different kind of call sites
package org.magicwerk.brownies.collections.sandbox;
import org.magicwerk.brownies.collections.GapList;
import org.magicwerk.brownies.collections.IList;
import org.magicwerk.brownies.collections.sandbox.CallSitePerformance.RunJmh.EnumCalc.CalcMode;
import org.magicwerk.brownies.test.JmhRunner;
import org.magicwerk.brownies.test.JmhRunner.Options;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.NavigableSet;
import java.util.TreeSet;
import org.magicwerk.brownies.collections.Key2List;
/**
* Example using Brownies Collections (https://github.com/magicwerk/brownies-collections)