TaiJuWu commented on PR #16231: URL: https://github.com/apache/kafka/pull/16231#issuecomment-2154228895
> ``` > MapBenchmark.testCopyOnWriteMap avgt 15 3518087.394 ± 167618.482 ns/op > MapBenchmark.testHashMap avgt 15 3284793.930 ± 288361.593 ns/op > ``` > > it seems `CopyOnWriteMap` is faster than `HashMap`? The benchmarl only test read part > ``` > MapBenchmark.testCopyOnWriteMap avgt 15 3518087.394 ± 167618.482 ns/op > MapBenchmark.testHashMap avgt 15 3284793.930 ± 288361.593 ns/op > ``` > > it seems `CopyOnWriteMap` is faster than `HashMap`? Maybe this is statistical error? The benchmark only test read part but the benefit of `CopyOnWriteMap` is write part. -- 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]
