Will RAM increase decrease compile time?

I have a late 2015 iMac 27inch base model with 8gb RAM. It takes a lot of time to index code files and compile while working with xcode and c++. I was wondering whether a RAM increase to 16gb or 32gb help me?

Observe RAM usage durring compilation getting cahed since when system runs out of RAM it will start to move it to hard drive so you never gonna run out of RAM to level that system will crash. So more RAM you have the system is less likely to use hard drive to page the memory, so system becomes faster but if you increase RAM more then it need there won’t be impact.

I say if you aim to upgrade RAM go for it, as it won’t only potentially speed up compilation, it will increase multitasking capabilities of you system as more software can store things in ram.

There other things you can do to improve compilation speed:

-Put Unreal and you project to SSD, C++ compilation operates on writing object files and then linking them together, so it compilation is dependent on how fast your drive read and write data

-More CPU cores, so VS and UBT can run more compilers on same time and compile more files in same time. Ofcorse you won’t see impact here if your project have small number of files to compile. More RAM in this case also helps.