Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/15064 )
Change subject: schema: use dense_hash_map instead of std::unordered_map ...................................................................... Patch Set 2: (2 comments) http://gerrit.cloudera.org:8080/#/c/15064/1//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/15064/1//COMMIT_MSG@9 PS1, Line 9: In a time series benchmark I'm working on, the client spent 12% of its : CPU in Schema::FindColumn. In particular, most of the CPU went to the : bucket calculation in std::unordered_map, which required a 'divq' : instruction that can take hundreds of cycles. > Any chance you can synthesize a microbenchmark that approximates this behav if it's OK, I'll decline on this -- there are a bunch of microbenchmarks floating around the web for dense_hash_map vs std::unordered_map and everyone agrees it's better http://gerrit.cloudera.org:8080/#/c/15064/1/src/kudu/common/schema.h File src/kudu/common/schema.h: http://gerrit.cloudera.org:8080/#/c/15064/1/src/kudu/common/schema.h@503 PS1, Line 503: :move(cols), ids, k > If my understanding is correct, expected_max_items_in_table is for the expe I rejiggered all this stuff in the next revision. Given the dense map is a simple table data structure, we no longer need the fancy allocator track memory usage, so I can use simple move constructors in cases like this instead of having to pick a random "expected number of elements" value as here. -- To view, visit http://gerrit.cloudera.org:8080/15064 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8e8f80229b2dcfad05e204a6f6e50ce7dc3f4c73 Gerrit-Change-Number: 15064 Gerrit-PatchSet: 2 Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Comment-Date: Fri, 17 Jan 2020 21:05:22 +0000 Gerrit-HasComments: Yes
