Click here to Skip to main content
15,887,214 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Python - no arguments, please Pin
megaadam26-Sep-22 10:26
professionalmegaadam26-Sep-22 10:26 
GeneralRe: Python - no arguments, please Pin
Chris Maunder26-Sep-22 11:56
cofounderChris Maunder26-Sep-22 11:56 
GeneralRe: Python - no arguments, please Pin
Zak River27-Sep-22 1:04
Zak River27-Sep-22 1:04 
QuestionRe: Python - no arguments, please Pin
CPallini29-Sep-22 20:08
mveCPallini29-Sep-22 20:08 
GeneralRe: Python - no arguments, please Pin
Gerry Schmitz26-Sep-22 7:45
mveGerry Schmitz26-Sep-22 7:45 
GeneralRe: Python - no arguments, please Pin
trønderen26-Sep-22 11:10
trønderen26-Sep-22 11:10 
GeneralRe: Python - no arguments, please Pin
Greg Utas26-Sep-22 12:22
professionalGreg Utas26-Sep-22 12:22 
GeneralRe: Python - no arguments, please Pin
trønderen27-Sep-22 7:56
trønderen27-Sep-22 7:56 
Greg Utas wrote:
MSBuild, x86 Release: 2m 52s
CMake/Ninja, x64 Release: 0m 32s
A factor of 5.4 for (presumably) doing identical jobs would make me very cautious. I would not take that at face value as an indicator of 'typical' performance, but spend some effort on learning what makes the one alternative more than five times faster.

Although x86 and x64 are not quite apples and oranges, it is at least apples and pears. So the two jobs are not identical.

Obviously, the compilers are different. Even if they have the same call line interface, different modules are activated. Were all the options exactly the same? E.g. the same level of optimization. The same amount of runtime checks. Etc.

Did the two jobs generate the same number of compiler activations, and the same number of object files? With two different target architectures, you cannot except exactly the same number of object files, but they should be comparable.

Where both jobs clean compiles? This includes e.g. precompilation of header files. For a 'fair' compare, you could run the job on a newly formatted disk, but if this forces one setup to do heavy one-time preparations that saves a lot of time later, maybe it isn't as 'fair' as you first thought. If you are doing an incremental, non-clean compile: Were exactly the same changes made in both cases? Are the dependency rules set up identically in the two alternatives?

Did both jobs do the same kind of preparatory work, e.g. building the dependencies? If the job 'in principle' is of the same kind, were there significant differences, such as in one case, the developer supplies dependencies, while in the other, it is automatically detected through analysis of the source code?

Even for a clean compile: Are the dependency rules set up 'ideally'? I have seen compile logs from large compilations (typically 30-60 minutes build time) compiling the same source file five times. This happens not once, but often! The developers argue that to maintain their part of the build files efficiently, they need to be independent of what the other guys are doing, and need to maintain their own independent dependencies ... (And they refuse to let a separate team or expert do all build file maintenance, claiming that is it too tightly interwoven with the source code.)

Did both jobs provide the same (/comparable) results? E.g. did they both include complete linking into an executable? Did both deliver auto-generated documentation? Did both generate the same amount and quality of debug information?

Given different target architectures: Was the number of actually compiled lines almost identical, or did #ifdef's make it significantly different?

How large part of the 32 or 172 seconds are actual compilation time? If the compiler is the same, the number of files and their contents the same, chances are epsilon squared for the one run to require 140 seconds more compilation time than the other. A large fraction of the time difference most likely lies in the build system processing. Note that this discussion started from a compilation/interpretation consideration; a lousy build system is not a good argument in favor of interpreted languages! (ref jmaida's joke in the JOTD a few threads higher up: "Yep, I used to have a truck like that once.")

I actually never got around to properly learn CMake/Ninja myself, but have worked shoulder by shoulder with people who do. What I have seen in everyday use is actually the very opposite of your experience: When you have made your source changes and hit F5, you debugger is running within a few seconds. Those Ninja runs tend to recompile half the code base. After having tried to learn CMake/Ninja, I have realized that it is very sensitive to the level of expertise of the build maintainers; you can give it very poorly designed (wrt. build perfomance) input files. But the developers don't care: After some unfortunate incidenses about ten years ago, when we still used classical make, and a few deliveries were made without one file being recompiled, we had a few years doing a complete rebuild for any edit. Just get faster machines to the build cluster! has been the mantra for years. So who cares to fine tune CMake/Ninja build files?

I am sure that setting up MSBuild jobs 'by hand' can result in just as inefficient builds as can be made with CMake/Ninja!

If you hand over your build to a build cluster, it really isn't significant whether it takes half a minute or two minutes to do the build. Far more essential is the turnaround time from your modified source file is saved to your debugger gives you control. That is not the time to do a complete rebuild. While one setup may reduce the time available for a coffee break, compared to the other, the file-save-to-debug time really is the most essential, and ranking of alternatives might come out quite differently.

Bottom line: I very strongly doubt that a factor of 5.4 for 'identical' jobs is caused by simply 'more efficient code' in the faster alternative. The two build systems certainly did much more different jobs than just the code generating for two target architectures.

And it contributes very little if anything to the interpreted vs. compiled languages discussion - except that if you can do a complete 240 KLOC job generating, compilation and linking, with all its associated management, in 32 seconds, you may conclude that compilation time is not any significant argument in favor of interpreted languages.
GeneralRe: Python - no arguments, please Pin
Greg Utas27-Sep-22 8:33
professionalGreg Utas27-Sep-22 8:33 
GeneralRe: Python - no arguments, please Pin
jsc4226-Sep-22 22:12
professionaljsc4226-Sep-22 22:12 
GeneralRe: Python - no arguments, please Pin
BryanFazekas27-Sep-22 1:39
BryanFazekas27-Sep-22 1:39 
GeneralRe: Python - no arguments, please Pin
trønderen27-Sep-22 6:52
trønderen27-Sep-22 6:52 
GeneralRe: Python - no arguments, please Pin
Derek Hunter26-Sep-22 21:39
Derek Hunter26-Sep-22 21:39 
GeneralRe: Python - no arguments, please Pin
maze326-Sep-22 23:29
professionalmaze326-Sep-22 23:29 
GeneralRe: Python - no arguments, please Pin
Drew Rankin27-Sep-22 3:55
professionalDrew Rankin27-Sep-22 3:55 
GeneralRe: Python - no arguments, please Pin
Marc Clifton27-Sep-22 4:50
mvaMarc Clifton27-Sep-22 4:50 
GeneralRe: Python - no arguments, please Pin
Member 1194113127-Sep-22 8:11
Member 1194113127-Sep-22 8:11 
GeneralRe: Python - no arguments, please Pin
Martin ISDN3-Oct-22 6:58
Martin ISDN3-Oct-22 6:58 
GeneralIntroduction Pin
harley d'mello26-Sep-22 2:49
harley d'mello26-Sep-22 2:49 
GeneralRe: Introduction Pin
RickZeeland26-Sep-22 3:16
mveRickZeeland26-Sep-22 3:16 
GeneralRe: Introduction Pin
Marc Clifton26-Sep-22 3:20
mvaMarc Clifton26-Sep-22 3:20 
GeneralRe: Introduction Pin
PIEBALDconsult26-Sep-22 4:58
mvePIEBALDconsult26-Sep-22 4:58 
GeneralIs Salesforce Ransomeware Proof? Pin
Michael Breeden26-Sep-22 0:48
Michael Breeden26-Sep-22 0:48 
GeneralRe: Is Salesforce Ransomeware Proof? Pin
Jörgen Andersson26-Sep-22 1:23
professionalJörgen Andersson26-Sep-22 1:23 
GeneralRe: Is Salesforce Ransomeware Proof? Pin
Michael Breeden26-Sep-22 1:31
Michael Breeden26-Sep-22 1:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.