Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
LogicalDesign

Best CPU for Compiling

Recommended Posts

Posted · Original PosterOP

Hello!

 

I've been looking into upgrading my computer, and the CPU is the main thing I'm stuck thinking about. Currently, I do a lot of compiling on my computer(Java, Android), and I really want to increase the speed of that as much as possible. However, a lot of the benchmarks that are out there for CPUs are either targeted towards video editing, or games, or are just artificial benchmarks.

 

I'm wondering if anyone would have any knowledge on how well compilers scale with multiple cores/threads. I have my doubts than more than 4 cores would really make any significant difference, but it would be interesting to know for certain.

 

So, what do you think?

 

Would it be better to go with something like a i7-6700K, a i7-5930K, or would it be worthwhile to rock dual Xeon E3-1276 v3?

 

Thanks!

Link to post
Share on other sites

Depends on size of project. 

 

 

If your gonna make the next Google Chrome a Xeon would be quite nice. If not then a core i5 or i7 desktop would work just fine.


How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill

Xiaomi Pocophone F1 6GB RAM 128GB Storage (Mid 2019 to present)

Samaritan XL (Early 2018 - present with GPU upgrades) - AMD Ryzen 7 1700X (8C/16T) , MSI X370 Gaming Pro Carbon, Corsair 16GB DDR4-3200MHz ,  Asus ROG Strix RX Vega 56 , Corsair RM850i PSU, Corsair H100i v2 CPU Cooler, Samsung 860 EVO 500GB SSD, Seagate BarraCuda 2TB HDD (2018), Seagate BarraCuda 1TB HDD (2014), NZXT S340 Elite, Corsair ML 120 Pro, Corsair ML 140 Pro

Link to post
Share on other sites

what socket/chipset do you have at the minute?


Personal Machines:
Spoiler

i7-8700k 5GHz, 32GB 3200MHz HyperX Predator, Gigabyte Z390 GamingX, MSI 2080Ti Lightning Z, Fractal Kelvin S36, RM850x, Define R6 TG, 4K

i7-4790k 4.8GHz, 32GB 2133MHz Dominator Platinum, Asus Z97 PRO GAMER, MSI 1080Ti Gaming X Trio, CM Nepton 240M, RM650, Define R5 TG, 1440p

i5-4460 3.2GHz, 16GB 1600MHz XMS3, AsRock H97M Pro4, MSI 1070Ti Titanium Edition, Antec Kuhler 240, Seasonic G550, Define Mini C, 4K(1440p)

Phenom x4 9950BE 3.4GHz, 8GB 800MHz XMS2, Asus M3A79-T Deluxe, eVGA 750Ti FTW w/Backplate, Corsair H45, Integra 450, Kolink Stronghold TG, 1080p

Personal Laptops:

Spoiler

i7-8750H, 32GB 2666MHz Samsung, Asus FX705GM-EV101T, HM370, GTX 1060 6GB, 1080p

i7-6700HQ, 16GB 2400MHz HyperX, MSI GE62-6QD, HM170, GTX960M 2GB, 1080p

Other Builds:

Spoiler

i5-4460 3.2GHz, 16GB HyperX Fury 1600, Gigabyte H97n-WiFi, eVGA 970 SC, Antec Kuhler 120, RM550x, Define Nano S, 1080p

A8-6600k 4.2GHz, 8GB Corsair XMS3 1333, AsRock FM2A68M-DG3+, eVGA 960 SSC, Noctua NH-L12, TX550m, Define Mini C, 1080p

i3-4170 3.7GHz, 8GB HyperX Fury 1600, MSI H81i, eVGA 950 SSC, Noctua NH-L9i, Silverstone SFX450, Silverstone SG-13B, 1366*768
Ryzen 3 2200G 3.7GHz - 8GB Patriot Viper 2400, Gigabyte B450M-DS3H, Wraith Stealth, TX550m, Corsair Air240, 1080p

i5-6400 3.3GHz, 16GB HyperX Savage 2666, Asrock H170M-ITXa/c, XFX R9 380 DD, Antec Kuhler 120, Silverstone SFX650, Silverston SG-13B, 1080p

Pending Builds:

Spoiler

i5 4690k 4.8GHz, 32GB HyperX Fury 2133, Gigabyte GA-Z97X-UD3H, eVGA 1070Ti FTW2, Corsair H100x, RM650x, Define R6 TG, 1080p

 

 
 
Link to post
Share on other sites

Hello!

 

I've been looking into upgrading my computer, and the CPU is the main thing I'm stuck thinking about. Currently, I do a lot of compiling on my computer(Java, Android), and I really want to increase the speed of that as much as possible. However, a lot of the benchmarks that are out there for CPUs are either targeted towards video editing, or games, or are just artificial benchmarks.

 

I'm wondering if anyone would have any knowledge on how well compilers scale with multiple cores/threads. I have my doubts than more than 4 cores would really make any significant difference, but it would be interesting to know for certain.

 

So, what do you think?

 

Would it be better to go with something like a i7-6700K, a i7-5930K, or would it be worthwhile to rock dual Xeon E3-1276 v3?

 

Thanks!

Welcome to LTT forums, read CoC. And make sure to follow your posts!


How to setup MSI Afterburner OSD | How to make your AMD Radeon GPU more efficient with Radeon Chill

Xiaomi Pocophone F1 6GB RAM 128GB Storage (Mid 2019 to present)

Samaritan XL (Early 2018 - present with GPU upgrades) - AMD Ryzen 7 1700X (8C/16T) , MSI X370 Gaming Pro Carbon, Corsair 16GB DDR4-3200MHz ,  Asus ROG Strix RX Vega 56 , Corsair RM850i PSU, Corsair H100i v2 CPU Cooler, Samsung 860 EVO 500GB SSD, Seagate BarraCuda 2TB HDD (2018), Seagate BarraCuda 1TB HDD (2014), NZXT S340 Elite, Corsair ML 120 Pro, Corsair ML 140 Pro

Link to post
Share on other sites

Moved to CPUs, Motherboards, and Memory.


"It pays to keep an open mind, but not so open your brains fall out." - Carl Sagan.

"If you place a piece of bread somewhere on Earth, and another one on that point's antipodes, well you made yourself an Earth-sandwich." - Michael from Vsauce.

Link to post
Share on other sites

i do not know how many cores a compiler program can utilize. However if it is more then 4 cores, then AMDs FX series may be a good budget option, while the 5920k would be a good "top end" option.

@patrickjp93

that guy prolly knows more about core usage of your average compiler program then i do.

Link to post
Share on other sites

If you program in an IDE, then there are usually options to activate parallel compiling. Sticking point? If you have a deep inheritance tree that doesn't have a good branching factor, parallel compiling will get you nowhere. Lots of independent classes with 1 main that makes use of them? Parallel compiling scales almost perfectly. The Java compiler is not one I'm particularly familiar with, but Oracle isn't a slouch when it comes to software development and in fact builds some of the highest core-count CPUs in the world. If you use a text editor and call the compiler, there's probably a flag for parallel compiling.

As per compiler benchmarks, there may be Java variants of the ones used to compare GCC and Clang both on performance and compile time. Start there.


Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to post
Share on other sites

Hey, First off java does not technically compile in the normal sense.

 

It compiles to bytecode which both gcc/clang can use.

 

You can use pretty much any compiler, I'd recommend openjdk/jre and your regular gcc/clang as they are the best compilers.

 

Now I've been reading, and from experience, unless you're writing massive code that's specific to one set of instructions.

 

You can use anything, cores don't matter when compiling.

 

The compiler's job is to read your code, verify it's syntax and assemble it in bytecode.

 

Personally any cpu will do.

 

You do not get any linear improvement when compiling when using more cores.

 

 

Link to post
Share on other sites

If you program in an IDE, then there are usually options to activate parallel compiling. Sticking point? If you have a deep inheritance tree that doesn't have a good branching factor, parallel compiling will get you nowhere. Lots of independent classes with 1 main that makes use of them? Parallel compiling scales almost perfectly. The Java compiler is not one I'm particularly familiar with, but Oracle isn't a slouch when it comes to software development and in fact builds some of the highest core-count CPUs in the world. If you use a text editor and call the compiler, there's probably a flag for parallel compiling.

As per compiler benchmarks, there may be Java variants of the ones used to compare GCC and Clang both on performance and compile time. Start there.

He's writing java not assembly, I don't think he'll be writing algorithms that need such speed and branch predictability in java any way.

You're probably going to write that in c and assembly.

 

There are jvms that can handle a massive amount of ram and cores but they don't matter to normal developers and the regular jvm doesn't need anything extravagant.

Link to post
Share on other sites

Java uses 1 core for compilation. Junit can run in parallel but the JVM compilation process is limited to a single core and once you have an ssd you will find it scales with clockspeed.The cores are useful for other reasons (profilers, the app itself, your database etc) but directly for compilation of Java and android its not helpful.

Link to post
Share on other sites
Posted · Original PosterOP

Thanks for all the quick replies, all of them are super helpful!

 

It seems the general consensus is that more cores does not really help in this situation. So, I guess I'll have to look into getting just an i7, and overclock that. Kind of sucks though, as if running dual Xeons would have helped a lot, that would be a very fun rig to build. Oh well.

 

Would this be a good place for Skylake? As I've heard it's per core performance is better than last gen's.

Link to post
Share on other sites

Sorry for posting on this old thread but I cannot let the LogicalDesign's conclusion be the last post in this thread. I want to fix this as I was also looking for benchmarking around compiling and this thread came up first on my google search. So I want to help other who stumble on this thread and leave better informed. Many new programmers get into programming focus on writing code and it takes a while for them to understand how their code then becomes binary executables or libraries. Is a good thing to know, which I won't fully explain as there's plenty of other resources, but many programmers can probably become relatively successful without knowing.

 

TLDR:

Hell YES! More cores can help with compile time.

 

Longer version:

Clock speed definitely help compile time. However core count will very likely help compile time even more but there's a couple of condition. 

  1. The language and compiler you are using (does the compiler support parallel optimization)
    1. Compiling time is a problem many people are working on and higher clock speed is one of many ways. At some point (well before this thread even started) there were several walls cpu companies faced with increasing clock speed, to name a few stability, heat, power consumption, laws of physics. So utilizing multiple cores for faster compiling became A method to decrease compiling time.
  2. Number for files involved in your projects
    1. How do more cores help? For C and C++  projects with multiple files, each file needs to be compile which generates and object file. Once they are all created a linker will more or less combine they parts to create your binary. Hopefully from this oversimplified explanation you can see how the files and be distributed to multiple core (for gcc these are called jobs). And I'm sure other compilers for other languages operate similarly as well including java. 
  3. If you're compiling from scratch vs recompiling a single file (or few)
    1. There's another optimization scheme where the compiler will cache your your previous compiled code (objects) and reuse them for future build if the code for those has not changed. Thus only compile file which has changed. So if you only changed one file or a few, you might not see much benefits from more cores.
  4. Whether your IDE is using the compiler option to build in parallel.
    1. Most if not all modern compiler will have parallelism optimization but some will need to be implicitly configured to do so. If you're using an IDE there's likely an option for it, but not always.

 

I'm sure there's more points and I might be wrong a few thing but the believe in what I laid out is generally correct. While more cores is generally better you need to consider the cpu as a whole and probably the entire machine. Hope this helps new programmers young and old alike.

Link to post
Share on other sites
Just now, pjv2500 said:

Sorry for posting on this old thread but I cannot let the LogicalDesign's conclusion be the last post in this thread. I want to fix this as I was also looking for benchmarking around compiling and this thread came up first on my google search. So I want to help other who stumble on this thread and leave better informed. Many new programmers get into programming focus on writing code and it takes a while for them to understand how their code then becomes binary executables or libraries. Is a good thing to know, which I won't fully explain as there's plenty of other resources, but many programmers can probably become relatively successful without knowing.

 

TLDR:

Hell YES! More cores can help with compile time.

 

Longer version:

Clock speed definitely help compile time. However core count will very likely help compile time even more but there's a couple of condition. 

  1. The language and compiler you are using (does the compiler support parallel optimization)
    1. Compiling time is a problem many people are working on and higher clock speed is one of many ways. At some point (well before this thread even started) there were several walls cpu companies faced with increasing clock speed, to name a few stability, heat, power consumption, laws of physics. So utilizing multiple cores for faster compiling became A method to decrease compiling time.
  2. Number for files involved in your projects
    1. How do more cores help? For C and C++  projects with multiple files, each file needs to be compile which generates and object file. Once they are all created a linker will more or less combine they parts to create your binary. Hopefully from this oversimplified explanation you can see how the files and be distributed to multiple core (for gcc these are called jobs). And I'm sure other compilers for other languages operate similarly as well including java. 
  3. If you're compiling from scratch vs recompiling a single file (or few)
    1. There's another optimization scheme where the compiler will cache your your previous compiled code (objects) and reuse them for future build if the code for those has not changed. Thus only compile file which has changed. So if you only changed one file or a few, you might not see much benefits from more cores.
  4. Whether your IDE is using the compiler option to build in parallel.
    1. Most if not all modern compiler will have parallelism optimization but some will need to be implicitly configured to do so. If you're using an IDE there's likely an option for it, but not always.

 

I'm sure there's more points and I might be wrong a few thing but the believe in what I laid out is generally correct. While more cores is generally better you need to consider the cpu as a whole and probably the entire machine. Hope this helps new programmers young and old alike.

This is like 4 years old OP is not gonna see your response


Discord: iLostMyXbox21#4649

I took a walk around the world to Ease my troubled mind I left my body lying somewhere In the sands of time I watched the world float to the dark Side of the moon I feel there is nothing I can do, yeah I watched the world float to the Dark side of the moon After all I knew it had to be something To do with you I really don't mind what happens now and then As long as you'll be my friend at the end If I go crazy then will you still Call me Superman If I'm alive and well, will you be There holding my hand I'll keep you by my side with My superhuman might Kryptonite You called me strong, you called me weak But still your secrets I will keep You took for granted all the times Never let you down You stumbled in and bumped your head, if Not for me then you'd be dead I picked you up and put you back On solid ground If I go crazy then will you still Call me Superman If I'm alive and well, will you be There holding my hand I'll keep you by my side with My superhuman might Kryptonite Oh whoa whoa If I go crazy then will you still Call me Superman If I'm alive and well, will you be There holding my hand I'll keep you by my side with My superhuman might Kryptonite If I go crazy then will you still Call me Superman If I'm alive and well, will you be There holding my hand I'll keep you by my side with My superhuman might Kryptonite

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


×