Would increasing the RAM really make that big a difference in terms of kernel compilation time? It feels to me that 16GB should be plenty for any sort of caching that will speed things up.
Yeah if you think about it in lower levels. Many optimizations use memoization to save clock speed. Therefore, you almost always need more memory to speed things up.
As there are compilation units, translation of addresses, linking, etc.
Memory AND storage takes important part. While CPU might be "idle" in some parts.
For big projects especially, memory and storage speed would be important for proper benchmarking.