Oh, that number appears to represent the number of invocations of the @Benchmark method. It's a numerator without a denominator; it has no meaning on its own. The important metrics are p0.50 (median execution time) and gc.alloc.rate (rate of heap allocation), since they directly address the questions of the time- and space-efficiency of Iterators that we are discussing in this thread.
It's difficult to see just how identical these perf numbers are without a basis for comparison. I suggest changing `new ArrayList` to `new LinkedList` and re-running the benchmark in order to see the difference between iteration and repeated indexing in a linked list. Later this week, I may try to develop a variant of the benchmark that will defeat scalar replacement and force the JVM to allocate the Iterators on the heap in full, and therefore to GC them as well. On Tue, Nov 27, 2018 at 11:33 AM Oleg Kalnichevski <ol...@apache.org> wrote: > > On Tue, 2018-11-27 at 11:12 -0800, Ryan Schmitt wrote: > > I'm not sure what point you're making with these numbers. They're > > effectively identical; the GC numbers in particular show no > > appreciable allocation or collection in either benchmark. > > > > I am also unsure what exactly you are trying to prove here but 5041408 > and 4310920 do not look effectively identical to me. > > Oleg > > > On Mon, Nov 26, 2018 at 4:05 AM Oleg Kalnichevski <ol...@apache.org> > > wrote: > > > > > > I clearly cannot agree with your conclusion based on the numbers I > > > am > > > seeing locally. > > > > > > --- > > > Benchmark Mode Cnt Score > > > Error Units > > > Testing6.index sample 5041408 51.985 > > > ± 0.244 ns/op > > > Testing6.index:index·p0.00 sample 31.000 > > > ns/op > > > Testing6.index:index·p0.50 sample 49.000 > > > ns/op > > > Testing6.index:index·p0.90 sample 52.000 > > > ns/op > > > Testing6.index:index·p0.95 sample 62.000 > > > ns/op > > > Testing6.index:index·p0.99 sample 70.000 > > > ns/op > > > Testing6.index:index·p0.999 sample 149.000 > > > ns/op > > > Testing6.index:index·p0.9999 sample 3174.873 > > > ns/op > > > Testing6.index:index·p1.00 sample 46144.000 > > > ns/op > > > Testing6.index:·gc.alloc.rate sample 5 0.007 > > > ± 0.003 MB/sec > > > Testing6.index:·gc.alloc.rate.norm sample 5 ≈ > > > 10⁻⁴ B/op > > > Testing6.index:·gc.count sample 5 ≈ > > > 0 counts > > > Testing6.iterator sample 4310920 50.587 > > > ± 0.233 ns/op > > > Testing6.iterator:iterator·p0.00 sample 32.000 > > > ns/op > > > Testing6.iterator:iterator·p0.50 sample 48.000 > > > ns/op > > > Testing6.iterator:iterator·p0.90 sample 54.000 > > > ns/op > > > Testing6.iterator:iterator·p0.95 sample 56.000 > > > ns/op > > > Testing6.iterator:iterator·p0.99 sample 62.000 > > > ns/op > > > Testing6.iterator:iterator·p0.999 sample 115.000 > > > ns/op > > > Testing6.iterator:iterator·p0.9999 sample 1974.000 > > > ns/op > > > Testing6.iterator:iterator·p1.00 sample 80896.000 > > > ns/op > > > Testing6.iterator:·gc.alloc.rate sample 5 0.007 > > > ± 0.002 MB/sec > > > Testing6.iterator:·gc.alloc.rate.norm sample 5 ≈ > > > 10⁻⁴ B/op > > > Testing6.iterator:·gc.count sample 5 ≈ > > > 0 counts > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org > > For additional commands, e-mail: dev-h...@hc.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org > For additional commands, e-mail: dev-h...@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org