Jump to content
Sign in to follow this  
Roger Cigol

Compile times Embarcadero clang C++ 17 vs other C++ 17 compilers

Recommended Posts

Has anyone else compared compile times for Embarcadero clang C++ 17 vs other C++ 17 compilers? The compile times between clang and GNU C++ are supposed to be roughly the same (some say clang is often slightly faster) but if you compile a single C++ 17 unit using Clang 64 (Windows 64 bit, VCL) in Rad studio IDE (Alexandria 11.1) it still seems to take a lot longer than a similar length unit in other systems. It's almost as if it is recompiling the VCL headers every time....

Share this post


Link to post

We're moving from BCB2007 where it takes 3.2s (Classic, using Twine x 16) to compile our main project.  With 11.1 (Clang + Twine) it takes ~90s.  Such a huge difference we've often had seconds thoughts about moving to v11.  I'm hoping that it's just a case of more fully optimising the pch.

Share this post


Link to post

Make sure you right click on the pch file in the project and select "Use for precompiling".  This is set by default for a new project but won't be if you have an old project that used to be compiled with the classic compiler.

With that set I usually find moving from Classic to Clang that the build takes around 4 to 5 times longer, which can just about be squeezed down to only twice as long using Twine.

  • Thanks 1

Share this post


Link to post

Yep, already click the pch option, though I do find that it randomly unticks itself occasionally.  Not found out why just yet.

 

Twine - we've used it for many years but have recently found it not as reliable with 11.1.  We're now tending to use the IDE built in parallel compiling:

 

Tools|Options - IDE - Compiling and Running - Tick Background compilation and set Priority=High

Project Options - C++ Compiler - General Compilation - Enable Batch Compilation

Project Options - Project Properties - General - Tick 'Run C++ Compiler in a separate process'.  Subprocesses = 16 for me.

 

I find the above is a similar speed to Twine, but also has the added advantage of carrying the speed increase over when releasing with FinalBuilder,

 

We find the debugger is poor with Clang Win32, so may try a classic build again.  We found it gave catastrophic internal compiler error in 10.4.x.

 

 

 

Edited by David P

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×