Class PrimeStreams

java.lang.Object
net.kolotyluk.benchmark.PrimeStreams
Direct Known Subclasses:
PrimeStreams_jmhType_B1

public class PrimeStreams extends Object

Prime Numbers with Streams

These benchmarks can take a very long time to complete, and for some tests utilize almost 100% of all CPUs.

Make sure we are running with the right JDK for Project Loom
 $ "${JAVA_HOME}/bin/java" -version
 openjdk version "18-loom" 2022-03-15
 OpenJDK Runtime Environment (build 18-loom+2-74)
 OpenJDK 64-Bit Server VM (build 18-loom+2-74, mixed mode, sharing)
 
Make sure the laboratory has been compiled and installed for benchmarking.
 $ cd laboratory
 $ mvn clean install
 
Run the benchmarks.
 $ cd benchmarks
 $ mvn clean install
 $ java -jar target/benchmarks.jar PrimeNumbers
 
  • Constructor Details

    • PrimeStreams

      public PrimeStreams()
  • Method Details

    • main

      public static void main(String[] args) throws org.openjdk.jmh.runner.RunnerException
      Throws:
      org.openjdk.jmh.runner.RunnerException
    • serialPrimesTo_1000

      public void serialPrimesTo_1000()
    • serialPrimesTo_10_000

      public void serialPrimesTo_10_000()
    • serialPrimesTo_10_000_000

      public void serialPrimesTo_10_000_000()
    • parallelPrimesTo_1000

      public void parallelPrimesTo_1000()
    • parallelPrimesTo_10_000

      public void parallelPrimesTo_10_000()
    • parallelPrimesTo_10_000_000

      public void parallelPrimesTo_10_000_000()