Announcement

Collapse
No announcement yet.

Zapcc Caching C++ Compiler Open-Sourced

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by StefanBruens View Post

    ccache works on the output of the preprocessor. If you change a globally included header, only the files which are affected by the change are recompiled. So ccache reduces compilation time even when e.g. make/ninja/... trigger a recompilation of the whole project.
    If 5 files depend on the same (changed) header, then all 5 compilation steps will read the file from disk and start parsing it from scratch. ZapCC is more like a server serving compilation clients, the header can be loaded and parsed *once* instead of 5 times.

    Wonder whether their changes could be integrated into clangd easily.

    Comment


    • #12
      There's a lot of people shooting in the dark about how it woks, also - our code base compiles from scratch faster with zapcc. (Flags, gcc vs clang and code bases may vary)

      One of the major bottleneck this software solves is the client/server architectre of this software. It keeps a single onstance of the compile server open - caching everything and removing the minimum compile time bottleneck. Say your program takes 3 seconds to recompile any change, this has been able to bring it down to a fraction of a second.

      Comment


      • #13
        Originally posted by dimko View Post
        As someone who compiles on daily basis - I don't care about compiling times. I care about stability of executable and speed of given executable. So.... Pf...
        While I do care about compile times, they're not as important to me as the integrity of the output. As such, I'd only use this if the output were binary-identical to standard Clang or GCC.

        It'd be great to see someone build this directly into llvm. Then, you could even see benefits with things like dynamic recompilation of GPU shaders.

        I've previously used both the "ice cream compiler" distributed compilation framework and precompiled headers. Not using either, currently.

        Comment


        • #14
          Originally posted by dimko View Post
          As someone who compiles on daily basis - I don't care about compiling times. I care about stability of executable and speed of given executable. So.... Pf...
          You'll care when compile times take a few hours to get done.

          Comment


          • #15
            Originally posted by coder View Post
            While I do care about compile times, they're not as important to me as the integrity of the output. As such, I'd only use this if the output were binary-identical to standard Clang or GCC.

            It'd be great to see someone build this directly into llvm. Then, you could even see benefits with things like dynamic recompilation of GPU shaders.

            I've previously used both the "ice cream compiler" distributed compilation framework and precompiled headers. Not using either, currently.
            Unless you've configured them to do so, or if perhaps the program is very simple etc... GCC and Clang probably don't even produce identical binaries to themselves on recompilation. It has certainly been an issue in the past that GCC binaries themselves are not identical on recompilation at least not identical enough to md5sum them and get the same thing (executable code may be the same but usally the data sections have differences like build dates etc.... that change them at the very least).
            Last edited by cb88; 18 June 2018, 12:54 AM.

            Comment


            • #16
              Originally posted by dimko View Post
              As someone who compiles on daily basis - I don't care about compiling times. I care about stability of executable and speed of given executable. So.... Pf...
              Um, shouldn't a person in your position care about compile times, not the one that compiles only one application in a year? The changes here mostly affect the frontend, not code generation.

              Comment


              • #17
                Originally posted by caligula View Post
                Um, shouldn't a person in your position care about compile times
                Yes. I don't know what this guy is doing, but when you develop C++ software you will compile a lot while working on the code and this is where zapcc excels -- incremental changes lead to incremental builds. Especially as template programming is becoming more and more prevalent in a C++ codebase and templates are always in headers and always have to be compiled. A precompiled header does jack shit for you when you are working on your templated code.

                Compilation times during development _are_ of utter importance. Because it is the situation where, more often than not, you actively wait for the compilation to finish. Even if it's only 10-30 seconds, or exactly when it is only 10-30 seconds.

                This is not the compiler you use to ship your binary (for this I would also prefer GCC over Clang). But guess how often the compiler has done its work before a product is shipped.

                Comment


                • #18
                  Originally posted by AsuMagic View Post
                  My only complaint was that it proprietary.
                  it was merged with llvm one year ago. and it doesn't look like they want to do it again any time soon
                  so you are stuck with obsolete compiler

                  Comment


                  • #19
                    Originally posted by atomsymbol
                    Zapcc provides 3x speedup over GCC when recompiling my project. Initial compilation is slower than GCC 6.4, but this is performed just once per session.
                    that is strange. it works not like ccache, but like precompiled headers on steroids, so it should improve initial build time
                    on the other hand competent developers do not recompile their projects at all, so speed of recompilation does not matter

                    Comment


                    • #20
                      Originally posted by atomsymbol
                      Some concrete numbers for Zapcc on my machine
                      i see, you are using unusual definitions for 'recompilation' and 'first-time compilation'
                      i guess your test will be improved by ccache even more

                      Comment

                      Working...
                      X