On Tue, 2018-11-27 at 12:50 -0800, Ryan Schmitt wrote: > 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.
To me those are the only meaningful numbers - how many operations got executed within the same given period of time. More importantly, however, can we concentrate on something a bit more useful than applying pointless syntactic sugar, finalizing the APIs, for instance? Oleg > On Tue, Nov 27, 2018 at 11:33 AM Oleg Kalnichevski <[email protected]> > 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 < > > > [email protected]> > > > wrote: > > > > > > > > I clearly cannot agree with your conclusion based on the > > > > numbers I > > > > am > > > > seeing locally. > > > > > > > > --- > > > > Benchmark Mode Cnt Sco > > > > re > > > > Error Units > > > > Testing6.index sample 5041408 51.9 > > > > 85 > > > > ± 0.244 ns/op > > > > Testing6.index:index·p0.00 sample 31.0 > > > > 00 > > > > ns/op > > > > Testing6.index:index·p0.50 sample 49.0 > > > > 00 > > > > ns/op > > > > Testing6.index:index·p0.90 sample 52.0 > > > > 00 > > > > ns/op > > > > Testing6.index:index·p0.95 sample 62.0 > > > > 00 > > > > ns/op > > > > Testing6.index:index·p0.99 sample 70.0 > > > > 00 > > > > ns/op > > > > Testing6.index:index·p0.999 sample 149.0 > > > > 00 > > > > ns/op > > > > Testing6.index:index·p0.9999 sample 3174.8 > > > > 73 > > > > ns/op > > > > Testing6.index:index·p1.00 sample 46144.0 > > > > 00 > > > > ns/op > > > > Testing6.index:·gc.alloc.rate sample 5 0.0 > > > > 07 > > > > ± 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.5 > > > > 87 > > > > ± 0.233 ns/op > > > > Testing6.iterator:iterator·p0.00 sample 32.0 > > > > 00 > > > > ns/op > > > > Testing6.iterator:iterator·p0.50 sample 48.0 > > > > 00 > > > > ns/op > > > > Testing6.iterator:iterator·p0.90 sample 54.0 > > > > 00 > > > > ns/op > > > > Testing6.iterator:iterator·p0.95 sample 56.0 > > > > 00 > > > > ns/op > > > > Testing6.iterator:iterator·p0.99 sample 62.0 > > > > 00 > > > > ns/op > > > > Testing6.iterator:iterator·p0.999 sample 115.0 > > > > 00 > > > > ns/op > > > > Testing6.iterator:iterator·p0.9999 sample 1974.0 > > > > 00 > > > > ns/op > > > > Testing6.iterator:iterator·p1.00 sample 80896.0 > > > > 00 > > > > ns/op > > > > Testing6.iterator:·gc.alloc.rate sample 5 0.0 > > > > 07 > > > > ± 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: [email protected] > > > For additional commands, e-mail: [email protected] > > > > > > > > > ----------------------------------------------------------------- > > ---- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
