Does more memory or CPU increase your hashrate?

Hi Guys, im a bit confused here. Can someone shed some light as to what exactly increases your sol/s rate? Ive been meaning to upgrade but am hearing mixed ideas with regards to upping RAM or CPU power. Which is better. More ram or more cpu?

Thanks for any help!

iirc, CPU that supports AVX2 instruction set will boost your Sol/s by two-fold when used with Xenocat solver (this solver is integrated in nicehash miner).

Comparing between AVX2 CPUs, faster CPU would be better (obviously..)

Not sure about the ram. I think more bandwidth is better (4GBx4 sticks > 8GBx2 sticks)

Someone please correct me if I'm wrong.

I got 9-10 sols/s from amd 6300 with 4gb ddr3, then i added another 4 gb stick and got upto 13+ sols/s. I don't know if upgrading to 16gb will increase my performance. Also I think mining softwares is currently un-optimized, because ive read amd 8 core gets almost same hashrate, and amd 7950 gets same hashrate as rx 280x