Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: Any way to improve speed of clang compiler?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 10 - Last Post: Feb 9, 2017 2:36 AM Last Post By: Asger Joergensen Threads: [ Previous | Next ]
James Hogle

Posts: 7
Registered: 6/15/15
Any way to improve speed of clang compiler?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 3, 2017 9:12 AM
I have recently tried compiling my code with the Clang compiler in order to get access to C++ 11 features. However, the compiler is just so slow its unusable when compiling in debug mode. I have seen plenty of other threads on various forums where people are having similar problems with speed, but haven't found any solutions. Is there anything that can be done to improve the speed of the Clang compiler?
Petr Vykouk

Posts: 42
Registered: 6/4/00
Re: Any way to improve speed of clang compiler?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 3, 2017 11:05 AM   in response to: James Hogle in response to: James Hogle
James Hogle wrote:
I have recently tried compiling my code with the Clang compiler in order to get access to C++ 11 features. However, the compiler is just so slow its unusable when compiling in debug mode. I have seen plenty of other threads on various forums where people are having similar problems with speed, but haven't found any solutions. Is there anything that can be done to improve the speed of the Clang compiler?

You must buy supercomputer...but debugger for clang has very poor quality. C++1x features are only a dream today with C++ Builder.
Mike Versteeg

Posts: 118
Registered: 9/16/07
Re: Any way to improve speed of clang compiler?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 4, 2017 2:53 AM   in response to: Petr Vykouk in response to: Petr Vykouk
You must buy supercomputer...but debugger for clang has very poor quality. C++1x features are only a dream today with C++ Builder.

But don't make the mistake I made: do not buy a 4K monitor with it.
Oliver Weinheimer

Posts: 73
Registered: 8/20/04
Re: Any way to improve speed of clang compiler?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 8, 2017 3:08 AM   in response to: Mike Versteeg in response to: Mike Versteeg
Mike Versteeg wrote:
You must buy supercomputer...but debugger for clang has very poor quality. C++1x features are only a dream today with C++ Builder.

But don't make the mistake I made: do not buy a 4K monitor with it.

Hm, I am thinking about buying a 4K monitor - what is wrong with it?
In need more info :-)
Mike Versteeg

Posts: 118
Registered: 9/16/07
Re: Any way to improve speed of clang compiler?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 8, 2017 3:48 AM   in response to: Oliver Weinheimer in response to: Oliver Weinheimer
Oliver Weinheimer wrote:
Mike Versteeg wrote:
You must buy supercomputer...but debugger for clang has very poor quality. C++1x features are only a dream today with C++ Builder.

But don't make the mistake I made: do not buy a 4K monitor with it.

Hm, I am thinking about buying a 4K monitor - what is wrong with it?
In need more info :-)

Recent RAD Studio versions don't support high-DPI, so you must have super vision. Or an 80" 4K monitor.
Asger Joergensen

Posts: 370
Registered: 11/18/08
Re: Any way to improve speed of clang compiler?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 8, 2017 5:10 PM   in response to: Mike Versteeg in response to: Mike Versteeg
Hi Mike

Mike Versteeg wrote:

Hm, I am thinking about buying a 4K monitor - what is wrong with it?
In need more info :-)

Recent RAD Studio versions don't support high-DPI, so you must have super
vision. Or an 80" 4K monitor.

Isn't that just on Win10 where there is no XP style scaling ?
I use Berlin on a Win7 and there most of it scales except for the
Form designer, that one always run in 100%, but that is by design.

Best regards
Asger
Mike Versteeg

Posts: 118
Registered: 9/16/07
Re: Any way to improve speed of clang compiler?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 9, 2017 1:42 AM   in response to: Asger Joergensen in response to: Asger Joergensen
Asger Joergensen wrote:
Hi Mike

Mike Versteeg wrote:

Hm, I am thinking about buying a 4K monitor - what is wrong with it?
In need more info :-)

Recent RAD Studio versions don't support high-DPI, so you must have super
vision. Or an 80" 4K monitor.

Isn't that just on Win10 where there is no XP style scaling ?
I use Berlin on a Win7 and there most of it scales except for the
Form designer, that one always run in 100%, but that is by design.

That's not high-DPI support, that's just ugly. But all my development machines have moved on to Windows 10 yes.
Asger Joergensen

Posts: 370
Registered: 11/18/08
Re: Any way to improve speed of clang compiler?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 9, 2017 2:36 AM   in response to: Mike Versteeg in response to: Mike Versteeg
Hi Mike

Mike Versteeg wrote:

Recent RAD Studio versions don't support high-DPI, so you must have super
vision. Or an 80" 4K monitor.

Isn't that just on Win10 where there is no XP style scaling ?
I use Berlin on a Win7 and there most of it scales except for the
Form designer, that one always run in 100%, but that is by design.

That's not high-DPI support, that's just ugly. But all my development
machines have moved on to Windows 10 yes.

What is not high DPI support ??

Best regards
Asger
Johannes Weinert

Posts: 90
Registered: 7/19/02
Re: Any way to improve speed of clang compiler?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 5, 2017 11:24 PM   in response to: James Hogle in response to: James Hogle
Hi,

as you read other threads about the problem you may already know it:
There is TwineCompile which uses several parallel processes for the
compilation. I do not want to miss it. They have a trial version.

Regards

Hans

Am 03.02.2017 um 18:12 schrieb James Hogle:
I have recently tried compiling my code with the Clang compiler in order to get access to C++ 11 features. However, the compiler is just so slow its unusable when compiling in debug mode. I have seen plenty of other threads on various forums where people are having similar problems with speed, but haven't found any solutions. Is there anything that can be done to improve the speed of the Clang compiler?
Chris GW

Posts: 14
Registered: 9/8/07
Re: Any way to improve speed of clang compiler?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 7, 2017 7:31 AM   in response to: James Hogle in response to: James Hogle
The clang compiler is much slower. There are a couple of things that may help. In the Project Manager list, right-click on your PCH header file for precompiling and make sure "Use for Precompiling" is checked. Sometimes it seems to get unchecked randomly after upgrading. That can make a big difference. In Project Options, go to "C++ Compiler" and check the "Enable batch compilation", then go to "Project Properties", check the "Run C++ compiler in a separate process" and set the number of processor to match the number in your computer. That will compile several files simultaneously (but it doesn't help when compiling just one file). Using these setting for one of my projects reduced a full build from 160+ seconds to just 45 seconds.
Mike Versteeg

Posts: 118
Registered: 9/16/07
Re: Any way to improve speed of clang compiler?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 7, 2017 7:47 AM   in response to: Chris GW in response to: Chris GW
Chris GW wrote:
The clang compiler is much slower. There are a couple of things that may help. In the Project Manager list, right-click on your PCH header file for precompiling and make sure "Use for Precompiling" is checked. Sometimes it seems to get unchecked randomly after upgrading. That can make a big difference. In Project Options, go to "C++ Compiler" and check the "Enable batch compilation", then go to "Project Properties", check the "Run C++ compiler in a separate process" and set the number of processor to match the number in your computer. That will compile several files simultaneously (but it doesn't help when compiling just one file). Using these setting for one of my projects reduced a full build from 160+ seconds to just 45 seconds.

Faster indeed, but also scary. I like to see the compiler work and how many lines it compiled. For some reason user feedback is killed if you use these options.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02