impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Apple (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] Experiment: glibc strncmp/memcmp appears much faster than SSE4.2
Date Sat, 29 Apr 2017 23:20:09 GMT
Jim Apple has uploaded a new change for review.

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

Change subject: Experiment: glibc strncmp/memcmp appears much faster than SSE4.2
......................................................................

Experiment: glibc strncmp/memcmp appears much faster than SSE4.2

In these benchmarks, memcmp or strncmp look much faster than Impala's
SSE 4.2 code. A few things that might help explain why:

First, while Impala does not assume that sse3 and above are available
until it checks for them at run-time, memcmp/strncmp will use those
instructions, even when Impala's internal CpuInfo has turned those
instruction sets off.

Second, strncmp is ssse3-based and memcmp is sse4.1-based. I
discovered this by using 'perf record' and 'perf report' - the names
of the methods used include the instruction set they target, it
seems. It looks like strncmp uses mainly the pcmpeq instruction and
memcmp uses mainly the ptest instruction.

This benchmark file was originally written five years ago, so the
assumptions or hardware it was based on might no longer be timely.

Change-Id: Ie4786a4a75fdaffedd6e17cf076b5368ba4b4e3e
---
M be/src/benchmarks/string-compare-benchmark.cc
1 file changed, 72 insertions(+), 79 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/68/6768/1
-- 
To view, visit http://gerrit.cloudera.org:8080/6768
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4786a4a75fdaffedd6e17cf076b5368ba4b4e3e
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Jim Apple <jbapple-impala@apache.org>

Mime
View raw message