Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Clang compiler slow in 10 Seattle



Permlink Replies: 11 - Last Post: Mar 22, 2017 4:00 AM Last Post By: Arkady Semylio
Robin Pellatt

Posts: 21
Registered: 10/2/11
Clang compiler slow in 10 Seattle
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 10, 2015 5:12 AM
Hi,

Is there any way to speed up the Clang compiler? I've been testing on one of our relatively small applications using the 32-bit Clang compiler in 10 Seattle. This takes about 5 seconds to compile with the old compiler, but 50 seconds using the Clang compiler, so it is now TEN TIMES slower! Using the parallel compile option with EIGHT processes cuts this down to about 20 seconds, so only four times slower if I melt my computer.

BTW
I found that the precompiled headers do not work on upgraded projects out of the box, you have to right click on your existing pch file in the project explorer and select "Use for Precompiling". I made the above timings after doing this.

Thanks.
david hoke

Posts: 616
Registered: 2/9/07
Re: Clang compiler slow in 10 Seattle
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 10, 2015 6:57 AM   in response to: Robin Pellatt in response to: Robin Pellatt
No help here, just a comment...

Robin Pellatt wrote:

Hi,

Is there any way to speed up the Clang compiler? I've been testing
on one of our relatively small applications using the 32-bit Clang
compiler in 10 Seattle. This takes about 5 seconds to compile with
the old compiler, but 50 seconds using the Clang compiler, so it is
now TEN TIMES slower! Using the parallel compile option with EIGHT
processes cuts this down to about 20 seconds, so only four times
slower if I melt my computer.

BTW
I found that the precompiled headers do not work on upgraded projects
out of the box, you have to right click on your existing pch file in
the project explorer and select "Use for Precompiling". I made the
above timings after doing this.

Thanks.

Thanks for posting info, I had been wondering about the relative
performance of the two compilers.
Mike Versteeg

Posts: 118
Registered: 9/16/07
Re: Clang compiler slow in 10 Seattle
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 10, 2015 7:27 AM   in response to: david hoke in response to: david hoke
Haven't used 10 (I read about too many bugs) so still with 8, but its 64 bit CLANG compiler is also terribly slow. So looks like this is by design and not something that can be easily fixed. Fortunately for 32 bits we (still) have a choice.
Chris GW

Posts: 14
Registered: 9/8/07
Re: Clang compiler slow in 10 Seattle
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 15, 2015 10:16 AM   in response to: Mike Versteeg in response to: Mike Versteeg
Impressions so far:

The new batch compilation and subprocesses settings in Seattle 10 make a big different when building a 64 bit C++ project (from 215 seconds down to 35 seconds on one of my projects). The compiler also finds many more potential bugs (use of uninitialized variables in non-trivial code, unused class members, etc.) that the classic compiler never noticed.

Code Insight seems to be faster and better, but still needs work.

Many math functions (sin, cos, etc.) for 64 bit C++ are still almost 100 times slower than the 32 bit compiler [RSP-11166]. You can call the Delphi equivalent (Sin, Cos, etc.) instead to get better performance.

I did encounter a few new bugs (such as DrawElement link error [RSP-12237] and a blank <ProjectExtensions/> requiring manual editing of the .cbproj file), but no show-stoppers so far. For some reason I was "not authorized" to download the web install for Seattle 10. E-mailed Embarcadero, but still have not received a reply. Not impressed. I was able to download the ISO, which automatically detected my subscription license.
Gord Pollock

Posts: 34
Registered: 12/13/03
Re: Clang compiler slow in 10 Seattle
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 15, 2015 7:40 PM   in response to: Chris GW in response to: Chris GW
On 15/09/2015 11:16 AM, Chris GW wrote:
Many math functions (sin, cos, etc.) for 64 bit C++ are still almost 100 times slower than the 32 bit compiler [RSP-11166].

YIKES!!
Yilmaz Yoru


Posts: 167
Registered: 1/1/03
Re: Clang compiler slow in 10 Seattle
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 18, 2015 5:05 PM   in response to: Gord Pollock in response to: Gord Pollock
Gord Pollock wrote:
On 15/09/2015 11:16 AM, Chris GW wrote:
Many math functions (sin, cos, etc.) for 64 bit C++ are still almost 100 times slower than the 32 bit compiler [RSP-11166].

YIKES!!

Huhhh ? 64bit should be faster than 32bit, in linux gcc does that faster May be it is about the 64bit math lib

--
Best Regards
Yilmaz Yoru
Ján Kolár

Posts: 7
Registered: 6/23/12
Re: Clang compiler slow in 10 Seattle
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 22, 2016 1:01 AM   in response to: Robin Pellatt in response to: Robin Pellatt
I tested new compiler right after the Seattle version of C++Builder was released. These are compile times for my project (~200 k lines):

C++Builder XE4 90 seconds (1,5 minutes)
C++Builder 10 Seattle old compiler 120 seconds (2 minutes)
C++Builder 10 Seattle clang compiler >972 seconds (>16min 12 seconds) - I dont know exact time because of bugs in compiler and linker but its very probably around 16 min 30 seconds

From these measurement you can see that new compiler is more than 10 times slower than old compiler which makes it practically unusable for real world projects. I think the reason is that Embarcadero is not activelly using C++Builder to make its own development work, so they have distorted view of the quality of their product. I cant judge Delphi part of RAD Studio because I have never used it, but C++ Builder from XE version always was in beta stage regarding quality. I am sorry to say this but this is my experience from working with C++ Builder everyday for more than 4 years. If you have the option I recommend you to choose Visual Studio over C++ Builder. The quality and support for it is somewhere else even though not perfect.

Edited by: Ján Kolár on Apr 22, 2016 1:02 AM
Mike Versteeg

Posts: 118
Registered: 9/16/07
Re: Clang compiler slow in 10 Seattle
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 22, 2016 1:26 AM   in response to: Ján Kolár in response to: Ján Kolár
I did not do an actual test but I got the impression, or maybe it is wishful thinking, that in 10.1 the compiler is slightly faster. Did you compare that too? I also saw mention of multi-threaded compiling, I wonder how that influences compile times? I agree Embarcadero does not seem to use their own product: the 64 bit debugger is still not working properly since it was introduced.
Robin Pellatt

Posts: 21
Registered: 10/2/11
Re: Clang compiler slow in 10 Seattle
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 28, 2016 10:43 AM   in response to: Mike Versteeg in response to: Mike Versteeg
Mike Versteeg wrote:
I did not do an actual test but I got the impression, or maybe it is wishful thinking, that in 10.1 the compiler is slightly faster. Did you compare that too? I also saw mention of multi-threaded compiling, I wonder how that influences compile times? I agree Embarcadero does not seem to use their own product: the 64 bit debugger is still not working properly since it was introduced.

I just tested again with 10.1 Berlin, got pretty much the same results as with 10 Seattle:
classic 32 10 s
clang 32 1 min 45s
clang 32 with 8 processes 31 s

So the compiler is still 10 times slower, and cannot even compare when maxing out the parallel processes. Is this ever likely to improve?
Petr Vykouk

Posts: 42
Registered: 6/4/00
Re: Clang compiler slow in 10 Seattle
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 30, 2016 3:11 AM   in response to: Ján Kolár in response to: Ján Kolár
Ján Kolár wrote:
I tested new compiler right after the Seattle version of C++Builder was released. These are compile times for my project (~200 k lines):

C++Builder XE4 90 seconds (1,5 minutes)
C++Builder 10 Seattle old compiler 120 seconds (2 minutes)
C++Builder 10 Seattle clang compiler >972 seconds (>16min 12 seconds) - I dont know exact time because of bugs in compiler and linker but its very probably around 16 min 30 seconds

From these measurement you can see that new compiler is more than 10 times slower than old compiler which makes it practically unusable for real world projects. I think the reason is that Embarcadero is not activelly using C++Builder to make its own development work, so they have distorted view of the quality of their product. I cant judge Delphi part of RAD Studio because I have never used it, but C++ Builder from XE version always was in beta stage regarding quality. I am sorry to say this but this is my experience from working with C++ Builder everyday for more than 4 years. If you have the option I recommend you to choose Visual Studio over C++ Builder. The quality and support for it is somewhere else even though not perfect.

Edited by: Ján Kolár on Apr 22, 2016 1:02 AM

Yes,

latest useable version of C++Builde is XE8 for me. Unfortunatelly I am waiting for C++11 features in Win32, but new compiler32 is still only in beta quality. Person, which is responsible for quality of C++Builder should be replaced.
Quality of C++Builder is now in critical state. (I am using it from version C++Builder 5).
Stephane Peneau

Posts: 3
Registered: 10/5/01
Re: Clang compiler slow in 10 Seattle
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 22, 2017 1:23 AM   in response to: Petr Vykouk in response to: Petr Vykouk
I use Borland/Embarcadero C++ since 20 years. We are at a critcical point ...
We try to convert our software product range from 32 to 64 bits. The compiling crashes, problems with libraries of components and the worse thing the slow compilation (4 hours if by chance there is not too much EDI compilation crashes ... 10 times slower than 32 bits ...).
Compiling with clang need also to include much more files that regular brcc32 compiler ...
Berlin 10.1 solves nothing ... How to get out of this gridlock ?
Is someone has a solution to compile faster ?

Edited by: M.Dubois on Mar 22, 2017 1:23 AM

M.Dubois Mar 22, 2017 1:25 AM
Arkady Semylio

Posts: 87
Registered: 9/18/15
Re: Clang compiler slow in 10 Seattle
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 22, 2017 4:00 AM   in response to: Stephane Peneau in response to: Stephane Peneau
Stephane Peneau wrote:
Is someone has a solution to compile faster ?

http://www.jomitech.com/twine.php
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02