Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/15635 )
Change subject: rowblock: use BMI instruction set when available for GetSelectedRows ...................................................................... Patch Set 1: (4 comments) http://gerrit.cloudera.org:8080/#/c/15635/1/src/kudu/common/rowblock.cc File src/kudu/common/rowblock.cc: http://gerrit.cloudera.org:8080/#/c/15635/1/src/kudu/common/rowblock.cc@80 PS1, Line 80: // TODO(todd) this is a bit faster when implemented with target "bmi" enabled. : // Consider duplicating it and doing runtime switching. > nit: can this be removed now? Done http://gerrit.cloudera.org:8080/#/c/15635/1/src/kudu/common/rowblock.cc@92 PS1, Line 92: static bool has_bmi = base::CPU().has_bmi(); > nit: maybe, add const? Done http://gerrit.cloudera.org:8080/#/c/15635/1/src/kudu/common/rowblock.cc@92 PS1, Line 92: static bool > static const bool Done http://gerrit.cloudera.org:8080/#/c/15635/1/src/kudu/common/rowblock.cc@114 PS1, Line 114: if (has_bmi) { : GetSelectedRowsInternal<true>(&bitmap_[0], n_bytes_, selected.data()); : } else { : GetSelectedRowsInternal<false>(&bitmap_[0], n_bytes_, selected.data()); : } > Can't use template parameter though, the function simply needs to be duplic yea, I didn't want to duplicate the function body itself so thought the runtime dispatch was cleaner. I also am not sure I trust the function multiversioning to work properly across all supported compilers, etc, whereas our explicit dispatch is easier to follow. I think ideally I'd use gcc's "target_clones" feature but this isn't available in clang or early versions of GCC. -- To view, visit http://gerrit.cloudera.org:8080/15635 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8ec74bc5db07c18d0e36de14a2343f49fc5c2859 Gerrit-Change-Number: 15635 Gerrit-PatchSet: 1 Gerrit-Owner: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Andrew Wong <andrew.w...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Bankim Bhavsar <ban...@cloudera.com> Gerrit-Reviewer: Grant Henke <granthe...@apache.org> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-Comment-Date: Thu, 02 Apr 2020 20:23:12 +0000 Gerrit-HasComments: Yes