My project is obj-c and C++ hybirid, filled with by both *.m and *.mm.
When compiling, if choose GCC 4.2, *.m obj-c source files compile speed is very fast but *.mm very very slow, but LLVM 2.0 can do a very good job, it is very fast for both *.m and *.mm.
My question:
Is there any difference between LLVM and GCC 4.2 during compliling *.mm files? why GCC 3.2 is so slow?
Any ieda or discussion will be appreciated, thanks in advance.
ENV: XCODE 4.0.1
Yes; they are totally different compilers; essentially everything about the process is different, even though the actual effect is similar (you get an executable which faithfully reproduces the semantics of your source code). One of the major goals for LLVM has been improving compilation speed. This is expected.
If you want to read about the internals of LLVM, here’s a reasonable place to start.