changeset 353:e451fc86654b

Better language in JMHSample_11_Loops.
author shade
date Mon, 20 Jan 2014 14:44:17 +0400
parents 2a5c68105d9a
children 7010d38ef764
files jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_11_Loops.java
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_11_Loops.java	Wed Jan 15 19:47:50 2014 +0400
+++ b/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_11_Loops.java	Mon Jan 20 14:44:17 2014 +0400
@@ -44,13 +44,14 @@
      * (This is the bad thing Caliper taught everyone). This tests explains why
      * this is a bad idea.
      *
-     * There is an argument that we would want to minimize the overhead for calling
-     * the test method, etc. Don't buy this argument; we had seen that calling this
-     * method is uber-fast.
+     * Looping uses the idea of minimize the overhead for calling the test method,
+     * if we do the operations inside the loop inside the method call.
+     * Don't buy this argument; you will see there is more magic
+     * happening when we allow optimizers to merge the loop iterations.
      */
 
     /*
-     * Suppose, we want to measure how much it takes to sum two integers:
+     * Suppose we want to measure how much it takes to sum two integers:
      */
 
     int x = 1;
@@ -66,7 +67,7 @@
     }
 
     /*
-     * These tests emulate the naive looping.
+     * The following tests emulate the naive looping.
      * This is the Caliper-style benchmark.
      */
     private int reps(int reps) {
@@ -79,8 +80,7 @@
 
     /*
      * We would like to measure this with different repetitions count.
-     * Special invocation is used in conjunction with AverageTimePerOp
-     * to get the individual operation cost.
+     * Special annotation is used to get the individual operation cost.
      */
 
     @GenerateMicroBenchmark