I finally got around to updating my <kotlin-benchm...
# feed
p
I finally got around to updating my kotlin-benchmark mini project. I’m probably doing something wrong on how I run benchmarks, so any help will be more than welcomed 🙂 Also, looking for more ideas about what can be tested
👍 3
i
You should probably look more at samples https://github.com/openjdk/jmh/tree/master/jmh-samples/src/main/java/org/openjdk/jmh/samples For example, if you look at how to do a correct benchmark for loops here https://github.com/openjdk/jmh/blob/master/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_34_SafeLooping.java you realize that you should change your benchmarks implementation. Your
checkNotNull
calls in another benchmarks works as a replacement of blackholes and probably can be replaced with returning the value https://github.com/openjdk/jmh/blob/master/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_09_Blackholes.java
🙏 1
p
Thank you for the tip @Ivan Pavlov I’ll have a look.
These samples are amazing. I need to read more of them 🙂 Although I’m also hoping to move to
kotlinx.benchamrks
at some point… I’ve applied some changes, let’s see what we come out with