Depends on the algo. For cryptonight, it's L3 cache that matters: each thread needs 2 MB of cache, so the hashrate will mostly depend on the L3 size rather than on the number of CPU cores. For other algos, cores/clocks might matter more.
Thanks for very useful info, wacko, I didn't know this before about cryptonote.