Radeon RX 580 8GB vs 4GB. Does memory matter?
Memory size does not affect mining speed.

To mine you need DAG file to be loaded into card's memory. DAG file grows in time. So when (and if) it will superpass 4GB - you could mine no more with these cards. Current Eth DAG size is ~2.3Gb. 4Gb is expected roughly on 06/FEB/2021 - after that date you will not be able to use 4Gb cards to mine Eth (and Im not even considering PoS here)