this post was submitted on 29 Jun 2025
17 points (100.0% liked)

Programming

24365 readers
521 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

My computer is slow at compiling, esp. LLVM. If I were to buy a new computer, what components would I focus on to improve this?

top 5 comments
sorted by: hot top controversial new old
[–] jcg@halubilo.social 21 points 6 months ago* (last edited 6 months ago) (1 children)

Compilation is CPU bound and, depending on what language mostly single core per compilation unit (I.e. in LLVM that's roughly per file, but incremental compilations will probably only touch a file or two at a time, so the highest benefit will be from higher single core clock speed, not higher core count). So you want to focus on higher clock speed CPUs.

Also, high speed disks (NVME or at least a regular SSD) gives you performance gains for larger codebases.

[–] HelloRoot@lemy.lol 9 points 6 months ago* (last edited 6 months ago)

On linux you can also use vmtouch to force cache the project files in RAM. This would speed up the first compilation of the day. On repeated compilations files that are read from disk would naturally be in the RAM cache already and it would not matter what drive you have.

I have used this in the past when I had slow drives. I was forcing all necessary system libs (my IDE, jdk etc.) and my project files into RAM at the start of the day, before going on a 2min break to make coffee while it read all that stuff from a hdd. Which sped up the workflow in general, at least at the start of the day.

It is not the same as a ramdisk, as the normal linux file cache writes back changes to the disk in the background.

You can also pin your fastest core to a specific process, so that it gets no tasks except for the one you want it to do. But that seems more hassle than it's worth, so I never tried that.

[–] redlemace@lemmy.world 4 points 6 months ago (2 children)

Monitor it's current resources, but disk I/O usually is a thing to look at. Don't use spinning disks

Don’t use spinning disks

Lets be honest here, that applies to any modern PC outside of mass media storage/backups. I've been saying for nearly 10 years now that HDDs don't belong in normal computers.

[–] staircase@programming.dev 1 points 6 months ago

I'm going NVME