This module contains JMH benchmarks for the ArrayView library.
To run all benchmarks:
sbt "benchmark/Jmh/run"
To run specific benchmarks:
sbt "benchmark/Jmh/run -i 10 -wi 5 -f1 -t1 .*Matrix4x4MultiplicationBenchmark.*"
Where:
-ispecifies the number of measurement iterations-wispecifies the number of warmup iterations-fspecifies the number of forks-tspecifies the number of threads.*ArrayViewBenchmark.*is a regular expression to select which benchmarks to run
The ArrayViewBenchmark class contains benchmarks for:
- Basic operations on 1D, 2D, and 3D arrays
- View operations on 1D and 2D arrays
- Performance comparison with different array sizes (10, 100, 1000)
To add new benchmarks:
- Create a new class in the
com.github.kright.arrayview.benchmarkspackage - Annotate the class with JMH annotations (
@State,@BenchmarkMode, etc.) - Add methods annotated with
@Benchmark - Run the benchmarks using the commands above