Mostafa Mokhtar has posted comments on this change.

Change subject: Use AVX2 operations to speedup Bloom filters by 10-100%.
......................................................................


Patch Set 7:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/3338/7/be/src/util/bloom-filter.h
File be/src/util/bloom-filter.h:

Line 176:   if (CpuInfo::IsSupported(CpuInfo::AVX2)) {
> That codegen improvement isn't actually vapourware, I have a draft patch th
Code-gen aside.
As far as I know it is not recommend to re-check conditions that don't change 
over the lifetime of an object. 

And if use_avx2 is defined as below it should be read from the registers in 
BucketFindAVX2 and BucketInsertAVX2.


private:
  /// log_directory_space_ is the log (base 2) of the number of buckets in the 
directory.
  const int log_num_buckets_;

  const bool use_avx2; 

  /// directory_mask_ is (1 << log_num_buckets_) - 1. It is precomputed for
  /// efficiency reasons.
  const uint32_t directory_mask_;


Line 254:   const bool result = _mm256_testc_si256(bucket, mask);
Did you check that AVX2 provides speedup even for highly selective filters?
As BucketFind can return earlier at first BUCKET_WORD.


-- 
To view, visit http://gerrit.cloudera.org:8080/3338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6fef4f6652876f8fd7e3f0e41431702380418c98
Gerrit-PatchSet: 7
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Jim Apple <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Jim Apple <[email protected]>
Gerrit-Reviewer: Mostafa Mokhtar <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to