matriv commented on a change in pull request #18632:
URL: https://github.com/apache/flink/pull/18632#discussion_r811040995
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/ThreadLocalCache.java
##########
@@ -75,4 +76,13 @@ protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
return this.size() > maxSize;
}
}
+
+ public static <K, V> ThreadLocalCache<K, V> of(Function<K, V> creator) {
Review comment:
And a more exhaustive test with 50 warmup and 50 iterations and 10 forks:
```
Benchmark Mode Cnt Score Error Units
MyBenchmark.testWithLambda thrpt 500 30191.141 ± 252.373 ops/ms
MyBenchmark.testWithoutLambda thrpt 500 30954.785 ± 79.428 ops/ms
```
--
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]