@@ -158,24 +158,24 @@ object Preconditions:
158158 /*
159159 * All recent hotspots (as of 2009) *really* like to have the natural code
160160 *
161- * if (guardExpression) {
161+ * if (guardExpression) {
162162 * throw new BadException(messageExpression);
163163 * }
164164 *
165- * refactored so that messageExpression is moved to a separate String-returning method.
165+ * refactored so that messageExpression is moved to a separate String-returning method.
166166 *
167- * if (guardExpression) {
167+ * if (guardExpression) {
168168 * throw new BadException(badMsg(...));
169169 * }
170170 *
171- * The alternative natural refactorings into void or Exception-returning methods are much slower.
171+ * The alternative natural refactorings into void or Exception-returning methods are much slower.
172172 * This is a big deal - we're talking factors of 2-8 in microbenchmarks, not just 10-20%. (This
173173 * is a hotspot optimizer bug, which should be fixed, but that's a separate, big project).
174174 *
175- * The coding pattern above is heavily used in java.util, e.g. in ArrayList. There is a
175+ * The coding pattern above is heavily used in java.util, e.g. in ArrayList. There is a
176176 * RangeCheckMicroBenchmark in the JDK that was used to test this.
177177 *
178- * But the methods in this class want to throw different exceptions, depending on the args, so it
178+ * But the methods in this class want to throw different exceptions, depending on the args, so it
179179 * appears that this pattern is not directly applicable. But we can use the ridiculous, devious
180180 * trick of throwing an exception in the middle of the construction of another exception. Hotspot
181181 * is fine with that.
0 commit comments