impala-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Apple (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (IMPALA-4312) Evaluate using clang for all builds for performance reasons
Date Sun, 30 Jul 2017 20:29:00 GMT

     [ https://issues.apache.org/jira/browse/IMPALA-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jim Apple resolved IMPALA-4312.
-------------------------------
    Resolution: Done

I evaluated it.  The benchmarks we already include showed it to be 5-10% slower overall.

> Evaluate using clang for all builds for performance reasons
> -----------------------------------------------------------
>
>                 Key: IMPALA-4312
>                 URL: https://issues.apache.org/jira/browse/IMPALA-4312
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>    Affects Versions: Impala 2.8.0
>            Reporter: Jim Apple
>              Labels: performance
>
> clang has more readable error and warning messages, and it is sometimes faster. We should
do some performance testing and see if we can use it exclusively and drop gcc.
> One example I came across recently was [~tarmstrong]'s fast bit unpacking:
> https://gerrit.cloudera.org/#/c/4494/
> Bitfields can be used for this rather than handcoding, and that would simplify the code,
but bitfields in gcc are very slow.
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48696
> Consider
> {code:none}
> struct Packed {
>   uint64_t i1 : 48;
>   uint64_t i2 : 48;
>   uint64_t i3 : 48;
>   uint64_t i4 : 48;
> } __attribute__((packed));
> uint64_t XorBitfield(const Packed& p) {
>   return p.i1 ^ p.i2 ^ p.i3 ^ p.i4;
> }
> {code}
> clang compiles this to three loads, two moves, three shifts, one and, and three xors,
for a total of 12 instructions.
> gcc compiles it to 80 instructions, including 24 loads.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message