brandboat commented on PR #16305:
URL: https://github.com/apache/kafka/pull/16305#issuecomment-2165051695

   > look into the use case of nodeStats: the number of node should be less 
than number of "get" very much. Hence, we need to go back to benchmark to 
reduce the number of writePerLoops to test "get" again. 10% updated is a bit 
weird to me for this case.
   
   Test with writePercentage 0.01 (100 times of computeIfAbsent) and 0.0001 (10 
times of computeIfAbsent), though there is not much difference under 0.0001, 
ConcurrentHashMap still performs slightly better than CopyOnWriteMap.
   
   ```
   Benchmark                                              (mapSize)  
(writePercentage)  Mode  Cnt     Score     Error  Units
   ConcurrentMapBenchmark.testConcurrentHashMapGet              100             
  0.01  avgt    5     3.871 ±   0.149  ns/op
   ConcurrentMapBenchmark.testConcurrentHashMapGet              100             
0.0001  avgt    5     2.259 ±   0.138  ns/op
   ConcurrentMapBenchmark.testConcurrentHashMapGetRandom        100             
  0.01  avgt    5     6.320 ±   0.231  ns/op
   ConcurrentMapBenchmark.testConcurrentHashMapGetRandom        100             
0.0001  avgt    5     4.070 ±   0.669  ns/op
   
   ConcurrentMapBenchmark.testCopyOnWriteMapGet                 100             
  0.01  avgt    5    57.898 ±   1.769  ns/op
   ConcurrentMapBenchmark.testCopyOnWriteMapGet                 100             
0.0001  avgt    5     2.767 ±   0.126  ns/op
   ConcurrentMapBenchmark.testCopyOnWriteMapGetRandom           100             
  0.01  avgt    5    61.361 ±   1.903  ns/op
   ConcurrentMapBenchmark.testCopyOnWriteMapGetRandom           100             
0.0001  avgt    5     4.270 ±   0.234  ns/op
   ```


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to