DomGarguilo commented on PR #27:
URL: https://github.com/apache/accumulo-access/pull/27#issuecomment-1781566643

   > I was wondering earlier about this change in `AccessEvaluatorImpl`.
   > 
   > ```
   > -       .collect(Collectors.toList());
   > +      .collect(Collectors.toUnmodifiableList());
   > ```
   > 
   > Looking at the sources 
([toList](https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/java.base/share/classes/java/util/stream/Collectors.java#L277),
 
[toUnmodifiableList](https://github.com/openjdk/jdk/blob/jdk-11%2B28/src/java.base/share/classes/java/util/stream/Collectors.java#L296)),
 you will see that `toUnmodifiableList` is similar to `toList`, except after 
collecting to a List it calls `List.of(list.toArray())`.
   > 
   > Could you back out this one change and run the benchmark on your branch 
again?
   
   New numbers after changing from `Collectors.toUnmodifiableList()` to 
`Collectors.toList()`
   
   Benchmark                                               Mode  Cnt   Score   
Error   Units
   AccessExpressionBenchmark.measureBytesParsing          thrpt   12  
**10.756** ± 0.254  ops/us
   AccessExpressionBenchmark.measureEvaluation            thrpt   12  
**13.836** ± 0.111  ops/us
   AccessExpressionBenchmark.measureEvaluationAndParsing  thrpt   12   
**6.600** ± 0.051  ops/us
   AccessExpressionBenchmark.measureStringParsing         thrpt   12   
**9.823** ± 0.072  ops/us


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to