codelipenghui commented on PR #20647:
URL: https://github.com/apache/pulsar/pull/20647#issuecomment-1607257960

   After doing a [benchmark 
test](https://github.com/apache/pulsar/pull/20648/files)
   We should use ConcurrentHashMap here, it performed super better than 
ConcurrentOpenHashMap and synchronized HashMap for put/remove operations. 
   
   ```
   CLHM_CON::Thread-3::put: 422ms
   CLHM_CON::Thread-5::put: 422ms
   CLHM_CON::Thread-4::put: 422ms
   CLHM_CON::Thread-0::put: 423ms
   CLHM_CON::Thread-2::put: 422ms
   CLHM_CON::Thread-1::put: 423ms
   CLHM_CON::Thread-0::get: 786ms
   CLHM_CON::Thread-1::get: 805ms
   CLHM_CON::Thread-4::get: 839ms
   CLHM_CON::Thread-5::get: 840ms
   CLHM_CON::Thread-3::get: 854ms
   CLHM_CON::Thread-2::get: 855ms
   CLHM_CON::Thread-0::remove: 112ms
   CLHM_CON::Thread-1::remove: 123ms
   CLHM_CON::Thread-4::remove: 97ms
   CLHM_CON::Thread-5::remove: 97ms
   CLHM_CON::Thread-2::remove: 84ms
   CLHM_CON::Thread-3::remove: 85ms
   CLHM_CON: 1367 ms
   CHM_CON::Thread-7::put: 33ms
   CHM_CON::Thread-6::put: 35ms
   CHM_CON::Thread-9::put: 37ms
   CHM_CON::Thread-8::put: 38ms
   CHM_CON::Thread-11::put: 38ms
   CHM_CON::Thread-10::put: 39ms
   CHM_CON::Thread-9::get: 630ms
   CHM_CON::Thread-10::get: 629ms
   CHM_CON::Thread-7::get: 635ms
   CHM_CON::Thread-11::get: 630ms
   CHM_CON::Thread-8::get: 631ms
   CHM_CON::Thread-6::get: 635ms
   CHM_CON::Thread-10::remove: 11ms
   CHM_CON::Thread-6::remove: 9ms
   CHM_CON::Thread-7::remove: 11ms
   CHM_CON::Thread-8::remove: 10ms
   CHM_CON::Thread-11::remove: 11ms
   CHM_CON::Thread-9::remove: 12ms
   CHM_CON: 680 ms
   HM_CON::Thread-16::put: 643ms
   HM_CON::Thread-15::put: 664ms
   HM_CON::Thread-14::put: 670ms
   HM_CON::Thread-13::put: 674ms
   HM_CON::Thread-17::put: 687ms
   HM_CON::Thread-12::put: 715ms
   HM_CON::Thread-16::get: 61876ms
   HM_CON::Thread-15::get: 62214ms
   HM_CON::Thread-13::get: 62312ms
   HM_CON::Thread-17::get: 62309ms
   HM_CON::Thread-14::get: 62450ms
   HM_CON::Thread-16::remove: 638ms
   HM_CON::Thread-15::remove: 555ms
   HM_CON::Thread-13::remove: 521ms
   HM_CON::Thread-17::remove: 522ms
   HM_CON::Thread-14::remove: 411ms
   HM_CON::Thread-12::get: 62816ms
   HM_CON::Thread-12::remove: 8ms
   HM_CON: 63538 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]

Reply via email to