I have added benchmarks for flatmap of this library and result4k, as well as included a benchmark for my proposed binding syntax.
There would be nothing stopping someone adding tests for kittinunfs result type, or to compare kotlin's internal result type as well. Or even arrow's Either type if you're curious!
This pr also contains the changes introduced in https://github.com/michaelbull/kotlin-result/pull/13
Adds benchmarking via https://github.com/Kotlin/kotlinx-benchmark Under the hood this gradle plugin uses the Java Microbenchmark Harness (JMH) A great guide which describes how to use jmh correctly can be found here: http://tutorials.jenkov.com/java-performance/jmh.html
I'm no expert at this. The benchmark tests themselves that I added are based on the work that @npryce had already done for result4k: https://github.com/npryce/result4k/blob/master/src/jmh/kotlin/com/natpryce/benchmarks.kt
I have added benchmarks for flatmap of this library and result4k, as well as included a benchmark for my proposed binding syntax. There would be nothing stopping someone adding tests for kittinunfs result type, or to compare kotlin's internal result type as well. Or even arrow's Either type if you're curious!
To run, simply call gradle task
benchmark
. Additional configurations for running bench marks can be specified in build.gradle: https://github.com/Kotlin/kotlinx-benchmark#configuration