chenBright commented on PR #2577:
URL: https://github.com/apache/brpc/pull/2577#issuecomment-2053925132

   在FlatMap的基础上支持Multi,以下是在本地运行FlatMapTest.perf得到的性能比较:
   
   ```
   [ value = 8 bytes ]
   Sequentially inserting 100 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/20/300/290/2010/210/230
   Sequentially erasing 100 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/20/1700/150/160/170/250
   Sequentially inserting 1000 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 16/15/360/342/206/195/219
   Sequentially erasing 1000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 15/18/178/159/149/159/149
   Sequentially inserting 10000 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 15/15/415/410/200/192/235
   Sequentially erasing 10000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 14/17/201/181/151/181/154
   [ value = 32 bytes ]
   Sequentially inserting 100 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/10/280/280/250/200/230
   Sequentially erasing 100 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/10/2070/150/160/160/160
   Sequentially inserting 1000 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 17/17/330/329/207/185/212
   Sequentially erasing 1000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/17/172/163/146/157/148
   Sequentially inserting 10000 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 17/17/405/406/197/185/215
   Sequentially erasing 10000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/16/206/188/158/168/159
   [ value = 128 bytes ]
   Sequentially inserting 100 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/30/290/290/420/220/250
   Sequentially erasing 100 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/10/180/150/160/160/160
   Sequentially inserting 1000 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 22/25/352/349/213/193/222
   Sequentially erasing 1000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/17/170/165/160/171/157
   Sequentially inserting 10000 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 21/24/416/422/210/206/242
   Sequentially erasing 10000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 16/16/213/190/163/171/159
   [ value = 8 bytes ]
   Randomly inserting 100 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/20/290/260/250/220/220
   Randomly erasing 100 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/20/240/220/170/170/180
   Randomly inserting 1000 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 16/15/315/309/206/191/215
   Randomly erasing 1000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 15/17/258/240/155/193/156
   Randomly inserting 10000 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 15/16/378/363/208/191/210
   Randomly erasing 10000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 14/16/311/290/162/187/169
   [ value = 32 bytes ]
   Randomly inserting 100 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/20/280/270/240/230/220
   Randomly erasing 100 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 10/20/250/220/170/180/160
   Randomly inserting 1000 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 18/18/310/304/209/192/209
   Randomly erasing 1000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/16/255/247/155/175/152
   Randomly inserting 10000 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 17/17/381/367/209/197/214
   Randomly erasing 10000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 15/17/310/296/163/188/168
   [ value = 128 bytes ]
   Randomly inserting 100 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 30/40/300/290/280/230/230
   Randomly erasing 100 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/20/230/220/160/180/170
   Randomly inserting 1000 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 29/33/327/329/219/197/220
   Randomly erasing 1000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 14/16/257/247/159/182/156
   Randomly inserting 10000 into 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 35/39/398/400/220/213/246
   Randomly erasing 10000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 35/36/330/319/221/224/200
   [ value = 8 bytes ]
   Seeking 100 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 10/20/140/130/60/70/50
   Seeking 1000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/13/172/161/77/54/46
   Seeking 10000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/16/216/211/73/56/51
   [ value = 32 bytes ]
   Seeking 100 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 10/20/130/130/70/60/50
   Seeking 1000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/13/174/163/73/54/49
   Seeking 10000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/13/218/217/75/58/52
   [ value = 128 bytes ]
   Seeking 100 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/10/140/130/80/50/60
   Seeking 1000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/13/173/171/73/55/49
   Seeking 10000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 26/22/238/252/107/89/91
   [ value = 8 bytes ]
   Seeking 100 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/10/140/130/70/50/60
   Seeking 1000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/14/180/160/68/57/47
   Seeking 10000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/13/221/210/72/57/51
   [ value = 32 bytes ]
   Seeking 100 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 20/10/140/130/70/60/50
   Seeking 1000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/13/167/160/69/53/50
   Seeking 10000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 15/14/224/219/75/59/52
   [ value = 128 bytes ]
   Seeking 100 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 10/10/140/130/80/50/60
   Seeking 1000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 13/13/170/167/70/54/52
   Seeking 10000 from 
FlatMap/MultiFlatMap/std::map/butil::PooledMap/std::unordered_map/std::unordered_multimap/butil::hash_map
 takes 26/22/238/240/85/70/67
   ```


-- 
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: dev-unsubscr...@brpc.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to