Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 555 Bytes

README.md

File metadata and controls

21 lines (11 loc) · 555 Bytes

This is a JMH benchmark evaluating whether public fixed-argument overloads for the List.of(...) factory methods improve performance.

To build:

mvn clean package

To run:

java -jar target/benchmarks.jar

To run and profile the garbage collector:

java -jar target/benchmarks.jar -prof gc

Thanks to Peter Levart for the suggestion to switch on the varargs argument length, which allows for some JIT optimizations:

http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-November/036382.html

See also:

http://openjdk.java.net/jeps/269