Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I got a chance to try this out. This is the file I used: https://gist.github.com/jevinskie/9843152

Top-of-trunk clang from http://llvm.org/apt/ takes ~2.1 seconds on my machine to preprocess the file to /dev/null. warp (compiled with -O4 -frelease -fno-bounds-check) takes ~2.8 seconds.

So this test case is faster with clang even without precompiled headers. It is hard to make a benchmark for clang's precompiled headers because the AST is lazy-loaded from the PCH. You would have to actually have code use values from the header.

EDIT: I forgot another advantage of clang: the preprocessing and compilation and assembly are all done within the same process, eliminating process creation overhead.



Thanks for the data point! (Also don't forget -frelease.)


You're welcome. =) I just double checked, I did have -frelease and I updated my parent comment to reflect that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: