Impala Public Jenkins has submitted this change and it was merged.
Change subject: IMPALA-5273: Replace StringCompare with glibc memcmp
......................................................................
IMPALA-5273: Replace StringCompare with glibc memcmp
glibc's memcmp, which dispatches dynamically based on the instructions
the processor supports, uses sse4.1's ptest, which is faster than our
implementation.
I ran a the benchmark below. The final query sped up by about 5x with
this patch.
create table long_strings (s string) stored as parquet;
insert into long_strings values (repeat("a", 2048));
insert into long_strings select a.s from long_strings a,
long_strings b;
insert into long_strings select a.s from long_strings a,
long_strings b;
insert into long_strings select a.s from long_strings a,
long_strings b;
insert into long_strings select a.s from long_strings a,
long_strings b;
insert into long_strings select a.s from long_strings a,
long_strings b;
insert into long_strings select a.s from long_strings a,
(select * from long_strings limit 10) b;
select count(*) from long_strings where s <= repeat("a", 2048);
Change-Id: Ie4786a4a75fdaffedd6e17cf076b5368ba4b4e3e
Reviewed-on: http://gerrit.cloudera.org:8080/6768
Reviewed-by: Jim Apple <[email protected]>
Tested-by: Impala Public Jenkins
---
M be/src/benchmarks/string-compare-benchmark.cc
M be/src/runtime/string-value.inline.h
2 files changed, 54 insertions(+), 165 deletions(-)
Approvals:
Impala Public Jenkins: Verified
Jim Apple: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/6768
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4786a4a75fdaffedd6e17cf076b5368ba4b4e3e
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Jim Apple <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Jim Apple <[email protected]>
Gerrit-Reviewer: Mostafa Mokhtar <[email protected]>