Compile time: When the processor makes all the difference

What does the average programmer do during the course of the day? Simply put, programmers write codes and test them over and over again until they have achieved the desired result or fixed the bug they are working on. Luckily, this job is more exciting than it sounds, but it definitely requires patience and precision. The details that many programmers overlook can make a difference in the long term. Let’s take a look at the example of compile time. Compile time is a nightmare that all programmers have to deal with. It is often taken for granted and accepted for what it is, yet in reality it is something that can make the difference between productivity and a lack of productivity. Compile time is effectively the time between the moment when the system input is made and the moment when the output becomes available. Put simply, it is the time taken by the PC to check that the code is correct.

If you’re wondering what the issue is, it’s probably because you are not a programmer. Imagine that you are writing a web or desktop application: Every time that you press the “build” button to compile the code, there is a waiting period that can vary enormously depending on the quantity of code being created. The problem lies in the fact that, in the case of a fairly complex code, the compile time can be between 30 and 40 minutes, during which the code cannot be modified in any way.

Imagine the amount of time a programmer wastes waiting for programs to compile throughout their working life!

To gain a better understanding, take a look at this graphic:

With the Firefox browser, the best-case scenario would be 23 minutes. But in the worst-case scenario, this time goes up to 46 minutes! What determines this difference? The performance of the central processing unit (CPU).

To say that time is money seems like a bit of a cliché, but obviously no-one likes to waste this much time. That’s why in certain cases, particularly in freelance work, every moment spent delaying can potentially have an impact on delivery, and therefore on earnings.

Having a CPU that allows you to save time means that not only will you earn more money at the end of the month, you will also have more free time and be able to guarantee increased performance. Try to picture it: You only lose six minutes when you compile your project, but when this happens ten times a day on average, at the end of the day you will have lost 60 minutes waiting for your PC to compile the code that you have written. Apply this figure to a month, and it turns into 20 hours of waiting time — we’ll let you do the rest of the math yourselves.

It’s clear that having a PC with a faster processor, like those that are equipped with a new seventh-generation Intel Core i7 (not to mention PCs with Extreme Edition processors), will make a substantial difference. Good programmers will know that the idea of building a PC or adding further components is not something to be scared of—they might even find it exciting. Perhaps, therefore, it’s not actually necessary to buy a complete PC.

As you saw in the graphic above, the difference in performance between the various processors is obvious. The reality is that you will be rewarded for the investment you make almost instantaneously; it could be an ideal and convenient solution to save you time (and therefore money) during your career as a programmer.

There are of course other ways of mitigating this problem, but it’s clear that, compared to the inbuilt power of the CPU, any changes you make can only ever be relative.

It could be useful to try Cloud building, which involves configuring a server in the Cloud, giving you the possibility of creating an automatic build of your software and allowing you to work while your server does the heavy lifting.

Alternatively, you could try to optimize your compiling software, but optimizing the compiler is no easy task. It takes a long time to understand how it works and to understand what parts need modifying, yet this can be a valid solution for trying to reduce the compile time of your software.

When we delve into the more technical aspects of using a PC, such as programming or using advanced graphics programs, it is clear that the power of the hardware makes a difference in a number of ways — the most significant of these being your waiting time. And there is nothing more precious than time.

By Marco

Photo credits:

Windows 8 – Visual Studio 2012

Compiling Qt SDK

Share This Article

Read Full Story