typelevel/spire

Benchmark docs in README.md out of date

gabrieljones opened this issue · 2 comments

This seems out of date.
https://github.com/typelevel/spire/blob/master/docs/src/main/tut/index.md#benchmarks

https://gitter.im/non/spire?at=55b4c0b5bab860d8168a0807

I get the idea there are various options for running the benchmarks.

I was able to figure out to type jmh:run instead of run. Not sure how to get a list of benchmarks or how to run a specific benchmark.

I'll submit a pull request if I figure out anything useful on my own.

$ sbt
sbt:spire> project benchmark
[info] Set current project to benchmark (in build file:/spire/)
sbt:benchmark> jmh:run -l
[info] Running (fork) org.openjdk.jmh.Main -l
[info] Benchmarks: 
[info] spire.benchmark.AddBenchmarks.addComplexDoubleStateDirect
[info] spire.benchmark.AddBenchmarks.addComplexDoubleStateGeneric
[info] spire.benchmark.AddBenchmarks.addComplexFloatStateDirect
...
sbt:benchmark> jmh:run -i 3 -wi 3 -f1 -t1 .*Julia.*
...
[info] Result "spire.benchmark.JuliaBenchmarks.timeMandelComplex":
[info]   384.516 ±(99.9%) 697.597 us/op [Average]
[info]   (min, avg, max) = (340.392, 384.516, 407.975), stdev = 38.238
[info]   CI (99.9%): [≈ 0, 1082.112] (assumes normal distribution)
...
[info] Result "spire.benchmark.JuliaBenchmarks.timeMandelFast":
[info]   157.633 ±(99.9%) 42.795 us/op [Average]
[info]   (min, avg, max) = (156.233, 157.633, 160.341), stdev = 2.346
[info]   CI (99.9%): [114.838, 200.428] (assumes normal distribution)
...

Invoke jmh:run -h for a list of benchmark options and what they mean.