Hello Andrew Wong, Kudu Jenkins, Andrew Wong, Bankim Bhavsar,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/15549

to look at the new patch set (#2).

Change subject: Use popcnt instruction for Bits::Count
......................................................................

Use popcnt instruction for Bits::Count

I found Bits::Count to be a noticeable contributor to profiles in my
TSDB benchmarking (a couple percent, if I recall correctly). This
switches to using popcnt instead of a lookup table.

This is technically a new CPU requirement, since the popcnt flag is
separate from the SSE4.2 flag. In practice, however, it doesn't appear
that there are any SSE4.2-capable machines that aren't also capable of
POPCNT. So, this shouldn't actually change our hardware requirements.
Another bit of evidence here is that '-msse4.2' (which we use) in clang
also enables -mpopcnt by default, so it was already possible for clang
to emit popcnt instructions for its own optimizations.

In any case, this instruction was introduced about 10 years ago, so even
if I missed one case of a 2010-era server, it's unlikely to still be in
use for Kudu.

Change-Id: Iad045e8b77e7baf65c42366eea3e107900eb4a64
---
M src/kudu/gutil/bits.cc
M src/kudu/gutil/cpu.cc
M src/kudu/gutil/cpu.h
M src/kudu/util/init.cc
4 files changed, 30 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/49/15549/2
--
To view, visit http://gerrit.cloudera.org:8080/15549
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iad045e8b77e7baf65c42366eea3e107900eb4a64
Gerrit-Change-Number: 15549
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Andrew Wong <andrew.w...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ban...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to