You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2016/12/04 11:18:58 UTC

[jira] [Commented] (KUDU-1784) Use binary bitcode format for precompiled LLVM IR

    [ https://issues.apache.org/jira/browse/KUDU-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15719778#comment-15719778 ] 

Todd Lipcon commented on KUDU-1784:
-----------------------------------

To quantify the IR parsing speedup, I just built the ll file to an x86 .o file.

{code}
 Performance counter stats for 'clang++ -c -o /tmp/test.o build/latest/src/kudu/codegen/precompiled.ll' (10 runs):

         65.114875      task-clock (msec)         #    0.986 CPUs utilized
                 3      context-switches          #    0.046 K/sec
                 2      cpu-migrations            #    0.030 K/sec
             2,438      page-faults               #    0.037 M/sec
       208,829,466      cycles                    #    3.175 GHz
   <not supported>      stalled-cycles-frontend
   <not supported>      stalled-cycles-backend
       315,846,377      instructions              #    1.49  insns per cycle
        64,242,657      branches                  #  976.808 M/sec
         1,361,528      branch-misses             #    2.12% of all branches

       0.066045618 seconds time elapsed                                          ( +-  0.50% )



 Performance counter stats for 'clang++ -c -o /tmp/test.o build/latest/src/kudu/codegen/precompiled.bc' (10 runs):

         44.214329      task-clock (msec)         #    1.088 CPUs utilized
                 4      context-switches          #    0.100 K/sec
                 2      cpu-migrations            #    0.050 K/sec
             2,224      page-faults               #    0.055 M/sec
       141,357,875      cycles                    #    3.524 GHz
   <not supported>      stalled-cycles-frontend
   <not supported>      stalled-cycles-backend
       178,036,983      instructions              #    1.40  insns per cycle
        33,618,259      branches                  #  838.144 M/sec
           824,908      branch-misses             #    2.45% of all branches

       0.040650303 seconds time elapsed                                          ( +-  1.52% )
{code}

IR parsing isn't a major bottleneck for us, but for a tiny patch seems worth doing.

> Use binary bitcode format for precompiled LLVM IR
> -------------------------------------------------
>
>                 Key: KUDU-1784
>                 URL: https://issues.apache.org/jira/browse/KUDU-1784
>             Project: Kudu
>          Issue Type: Improvement
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Minor
>
> - instead of compiling with '-S', should compile with '-c'
> - should use the extension '.bc' instead of '.ll' and update the variables accordingly
> - change 'xxd' wrapper to use unsigned char instead of char
> In a quick test, things still seem to work, and the resulting bitcode is about 25% the size (~300kb vs 1150KB). Seems like an easy win to shave a few MB off our packages and shaves ~20ms off of the IR parsing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)