I am exploring OpenJDK JMH for benchmarking my code. As per my understanding JMH by default forks multiple JVM in order to defend the test from previously collected “profiles”. Which is explained very well in this sample code.
However my question is that what impact I will have on result if I will execute using following two approaches:
1) with 1 fork , 100 iterations 2) with 10 fork, 10 iterations each
And which approach will give more accurate result?