And does it mean that the bigger the RAM, the higher the hashrate thus boosting your mining speeed?
What you mean is CPU cache, not RAM. In general, the bigger the cache, the better for mining Monero.
You can have as much mining-threads as you like but you need 2 MB cache for one thread. So if your CPU has for example 4 MB L3-Cache, the optimal number of threads is 2. If you have 3 MB, you should use 1 thread.
So all depends on the size of the CPU cache