by aDevilInMe · 12y ago · 0 comments
I would ask if there are any improvements between using wrap or just using clang.
I had the same question about how it compares to clang though. I suppose now that it's open source, someone can do some testing.
Yes, I think you are correct and this is what I was getting at. It seems like a propaganda exercise to promote D, you only have to look at the end of the article to see this "And join the D language community for the D Conference 2014 on May 21-23 in Menlo Park, CA."
For the record I am very much aware of who Andrei is and the influences he has on certain languages.
clang has a pretty optimized preprocessor (It even has things like using SSE2 to do some neat things with character processing).
GCC has a fairly modern one, but it's still beatable (and clang beats it handily).
I would expect you guys to post the numbers comparing it to the two most used things out there :)
I have serious doubts. Overall compilation time is kind of irrelevant to this discussion, because Warp is just a preprocessor.
While you can get some X speedup to gcc by replacing the preprocessor, X, as a factor of overall compilation time, is usually 0.2-0.5 in most cases, depending on size of file.
I expect the gains warp gets over gcc overall from preprocessing to be similar to those clang gets over gcc overall from preprocessing.
(Though it depends on the size of files being compiled, etc).
Most companies that want actual fast overall compilation and have the resources, build caching distributed compilation infrastructure (Google, Facebook).
As mentioned, if warp is really that much faster than clang's preprocessor that it mattered, clang would be fixed :)
Well, it is written in D. Walter (not Andrei) is talking about how he leveraged D's features to his advantage when writing Warp.
But it's actually not that tricky, since you can just change the defines it makes (after all, if you are maintaining your own toolchain, you are maintaining your own toolchain).
In fact, you are already doing it with warp to emulate GCC's defines.
Suffice to say, we've done it before to provide clang diagnostics but build with GCC.
This is really not meant as a dig (really!), but more of "why i figured facebook was not trying to make a transition". The companies trying to do so, are contributing heavily to LLVM to make that transition :)