Jump to content

Does programming require a good CPU?

Surpuppa

Does programming benefit from a better CPU? For example an i7 vs an i5?

I have no experience programming but I will start soon so I'm planning my next build. (Waiting for Ryzen though)

Link to comment
Share on other sites

Link to post
Share on other sites

The speed it's compiled will be different depending on the CPU. If you're going to be creating huge programs then a more powerful CPU will make a noticeable difference. If you're just dabbling then it doesn't matter. 

Make sure to quote or tag me (@JoostinOnline) or I won't see your response!

PSU Tier List  |  The Real Reason Delidding Improves Temperatures"2K" does not mean 2560×1440 

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, Surpuppa said:

Does programming benefit from a better CPU? For example an i7 vs an i5?

I have no experience programming but I will start soon so I'm planning my next build. (Waiting for Ryzen though)

If you're working on huge projects (thousands of lines of code or larger) than an i7 would be better. Absolutely better.

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

Even a program with 10 KLOC (kilo lines of code) will compile in probably under 20 seconds, depending on the compiler, its settings and language you are using.

 

Really, you can start programming on a Raspberry Pi, it doesn't matter. You don't need performance for this. Get a good keyboard and a good (big) monitor for it, that makes over 9000% more sense than more CPU performance :P

Link to comment
Share on other sites

Link to post
Share on other sites

33 minutes ago, Organized said:

Even a program with 10 KLOC (kilo lines of code) will compile in probably under 20 seconds, depending on the compiler, its settings and language you are using.

 

Really, you can start programming on a Raspberry Pi, it doesn't matter. You don't need performance for this. Get a good keyboard and a good (big) monitor for it, that makes over 9000% more sense than more CPU performance :P

It's converting media files to code that really starts to hit it hard.  I've had a program take over 20 minutes to compile.

Make sure to quote or tag me (@JoostinOnline) or I won't see your response!

PSU Tier List  |  The Real Reason Delidding Improves Temperatures"2K" does not mean 2560×1440 

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, JoostinOnline said:

It's converting media files to code that really starts to hit it hard.  I've had a program take over 20 minutes to compile.

What do you mean with media files? I never converted media files (except maybe images) for my programs.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Organized said:

What do you mean with media files? I never converted media files (except maybe images) for my programs.

Generally images for a GUI, and sometimes fonts.

Make sure to quote or tag me (@JoostinOnline) or I won't see your response!

PSU Tier List  |  The Real Reason Delidding Improves Temperatures"2K" does not mean 2560×1440 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, JoostinOnline said:

Generally images for a GUI, and sometimes fonts.

Well, but you do that once, not on every compile, right?

 

It also makes a big difference if you compile the debug or the release version. Usually in debug mode there are less optimizations done by the compiler which speeds it up a lot.

 

But, to come back to the i5 vs. i7 question: if your compiling takes 1 minute on an i5 (which is already a pretty big program), the i7 will be faster by maybe 10 or 20 seconds. Is it worth it? :D I don't think so.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Organized said:

Well, but you do that once, not on every compile, right?

 

It also makes a big difference if you compile the debug or the release version. Usually in debug mode there are less optimizations done by the compiler which speeds it up a lot.

 

But, to come back to the i5 vs. i7 question: if your compiling takes 1 minute on an i5 (which is already a pretty big program), the i7 will be faster by maybe 10 or 20 seconds. Is it worth it? :D I don't think so.

who said anything about it being a quad core i7 xD.

 

A six core or an 8 core could do better than that 4 core i7.

Judge a product on its own merits AND the company that made it.

How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill | (Probably) Why LMG Merch shipping to the EU is expensive

Oneplus 6 (Early 2023 to present) | HP Envy 15" x360 R7 5700U (Mid 2021 to present) | Steam Deck (Late 2022 to present)

 

Mid 2023 AlTech Desktop Refresh - AMD R7 5800X (Mid 2023), XFX Radeon RX 6700XT MBA (Mid 2021), MSI X370 Gaming Pro Carbon (Early 2018), 32GB DDR4-3200 (16GB x2) (Mid 2022

Noctua NH-D15 (Early 2021), Corsair MP510 1.92TB NVMe SSD (Mid 2020), beQuiet Pure Wings 2 140mm x2 & 120mm x1 (Mid 2023),

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, AluminiumTech said:

who said anything about it being a quad core i7 xD.

 

A six core or an 8 core could do better than that 4 core i7.

The OP did :P

 

My point is: if you are rendering videos every day and you can reduce the time it takes by e.g. 1 hour, a beefy CPU is worth it. But it's pretty pointless to reduce compiling time from 30s to 25s, these will be VERY expensive 5 seconds :D

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Organized said:

Well, but you do that once, not on every compile, right?

Depends if you're replacing the files.  I always do a clean and make to test the final version though, as on some occasions (and I don't know why) there are problems otherwise.  I've had it be glitchy before a clean, but not after.

 

But most of the time it doesn't matter, unless you're doing professional stuff.

Make sure to quote or tag me (@JoostinOnline) or I won't see your response!

PSU Tier List  |  The Real Reason Delidding Improves Temperatures"2K" does not mean 2560×1440 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Surpuppa said:

Does programming benefit from a better CPU? For example an i7 vs an i5?

I have no experience programming but I will start soon so I'm planning my next build. (Waiting for Ryzen though)

For the act of programming itself, not so much. You're basically working in a glorified text editor, something PC's 30 years ago could handle. Compiling huge projects can take a while, but is more disk related, as you're dealing with lots of small files (A SSD will help much more then a better CPU).

 

Debugging is very user limited. You're basically stepping trough the code while looking at variables and trying to figure out what's happening. The computer is waiting on you here, not the other way around.

 

As for running the program you're making. It depends. A tiny program that runs a critical loop can benefit greatly from a faster CPU while a large linear program will see no difference whatsoever.

It all comes down to loops. Even a pentium1 will run trough tens of thousands of lines a code in a second, but a loop can take ages depending on what it does. A faster CPU can potentially help there, but in most cases loops are slow because they're written in a cache unfriendly way. A loop with lots of cache misses will be slow on any CPU.

 

For the beginning programmer it'll probably make no difference.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Surpuppa said:

Does programming benefit from a better CPU? For example an i7 vs an i5?

It really depends on what you are doing. The speed benefit is negligible until you get to extremely large programs. That being said, there are some things to consider:
 

  • If you're building a program that primarily runs on a GPU, it would be nice to have a GPU.
  • If you're building a program that has multiple processes running at the same time, then it would be nice to have a multi-core or multithreaded processor.
  • If you're writing assembly, it would be nice to have a machine that uses the assembly language you know.
  • If you're writing a program to run on a cluster, then it would be nice to have a cluster.

You see my point? For a beginner it doesn't matter. You can use an arduino, a Raspberry pi, or a normal computer. 

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, AluminiumTech said:

If you're working on huge projects (thousands of lines of code or larger) than an i7 would be better. Absolutely better.

only while comping and as said maybe while running, having a file open even with 1000's of lines doesn't require a whole boat load of power.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

depends on what you are compiling. If you are just writing a scripting language like php on a web application then you can use anything. If you are compiling large libraries such as an android project then the CPU makes a huge difference. My desktop compiles 10X faster than my laptop's CPU. 3s vs 30s is a huge difference

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, straight_stewie said:

You see my point? For a beginner it doesn't matter. You can use an arduino, a Raspberry pi, or a normal computer. 

even if your code is simple, the libraries you are using might not be

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

For most programming languages / projects: no

When programming C/C++ (with templates): yes

Desktop: Intel i9-10850K (R9 3900X died 😢 )| MSI Z490 Tomahawk | RTX 2080 (borrowed from work) - MSI GTX 1080 | 64GB 3600MHz CL16 memory | Corsair H100i (NF-F12 fans) | Samsung 970 EVO 512GB | Intel 665p 2TB | Samsung 830 256GB| 3TB HDD | Corsair 450D | Corsair RM550x | MG279Q

Laptop: Surface Pro 7 (i5, 16GB RAM, 256GB SSD)

Console: PlayStation 4 Pro

Link to comment
Share on other sites

Link to post
Share on other sites

I'd personally prioritise bigger (or more) displays over a more powerful processor. An i5 is completely fine, programming really doesn't need a powerful computer - unless you're working on an application dependent on a computer's processing speed, such as games etc.

Web design and other lightweight programming can be done perfectly fine on any dual-core CPU with at least a 3GHz clock speed.

Speedtests

WiFi - 7ms, 22Mb down, 10Mb up

Ethernet - 6ms, 47.5Mb down, 9.7Mb up

 

Rigs

Spoiler

 Type            Desktop

 OS              Windows 10 Pro

 CPU             i5-4430S

 RAM             8GB CORSAIR XMS3 (2x4gb)

 Cooler          LC Power LC-CC-97 65W

 Motherboard     ASUS H81M-PLUS

 GPU             GeForce GTX 1060

 Storage         120GB Sandisk SSD (boot), 750GB Seagate 2.5" (storage), 500GB Seagate 2.5" SSHD (cache)

 

Spoiler

Type            Server

OS              Ubuntu 14.04 LTS

CPU             Core 2 Duo E6320

RAM             2GB Non-ECC

Motherboard     ASUS P5VD2-MX SE

Storage         RAID 1: 250GB WD Blue and Seagate Barracuda

Uses            Webserver, NAS, Mediaserver, Database Server

 

Quotes of Fame

On 8/27/2015 at 10:09 AM, Drixen said:

Linus is light years ahead a lot of other YouTubers, he isn't just an average YouTuber.. he's legitimately, legit.

On 10/11/2015 at 11:36 AM, Geralt said:

When something is worth doing, it's worth overdoing.

On 6/22/2016 at 10:05 AM, trag1c said:

It's completely blown out of proportion. Also if you're the least bit worried about data gathering then you should go live in a cave a 1000Km from the nearest establishment simply because every device and every entity gathers information these days. In the current era privacy is just fallacy and nothing more.

 

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, Surpuppa said:

Does programming benefit from a better CPU? For example an i7 vs an i5?

I have no experience programming but I will start soon so I'm planning my next build. (Waiting for Ryzen though)

No. The only thing you save with processing power is compilation time. But this is only a problem if your project is complex.

 

However, you should have a machine that closely matches your target as much as possible. If there's one thing I learned over the years is to never program and test off-target and expect it to work on-target.

Link to comment
Share on other sites

Link to post
Share on other sites

35 minutes ago, SCHISCHKA said:

depends on what you are compiling. If you are just writing a scripting language like php on a web application then you can use anything. If you are compiling large libraries such as an android project then the CPU makes a huge difference. My desktop compiles 10X faster than my laptop's CPU. 3s vs 30s is a huge difference

Just out of curiosity, what harddrives are in both those systems?

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, M.Yurizaki said:

No. The only thing you save with processing power is compilation time. But this is only a problem if your project is complex.

 

However, you should have a machine that closely matches your target as much as possible. If there's one thing I learned over the years is to never program and test off-target and expect it to work on-target.

While not always possible I have to second that. I once spent days finding a bug on a embedded micro-controller project that worked fine on the simulator/debugger AND emulator but not on the real target micro-controller. Turned out both the simulator and emulator did something the real hardware does not do.

Link to comment
Share on other sites

Link to post
Share on other sites

14 minutes ago, Unimportant said:

Just out of curiosity, what harddrives are in both those systems?

sata SSD

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, SCHISCHKA said:

sata SSD

Weird, I've never seen such a discrepancy in compile times with similar harddisks. 3S vs 30S is a big diffirence. Unless your laptop is 10 years old I'd say there is probably some other problem with it.

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Unimportant said:

Weird, I've never seen such a discrepancy in compile times with similar harddisks. 3S vs 30S is a big diffirence. Unless your laptop is 10 years old I'd say there is probably some other problem with it.

its a 2015 dual core i7. the desktop has 4X the cores. Gradle is not the fastest tool but it does make use of all 8 cores. hard drive speed cant really be improved unless i move the build folder to a ram disk but i cant be bothered testing that as i know the difference is due to the number of cores

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

Guest
This topic is now closed to further replies.

×