To put it into perspective, 64KB of DRAM contains 524288 transistors, as 1 bit of DRAM needs 1 transistor. The 6502 is mid-1970s technology while the 64KB DRAM is early-1980s technology.
Despite having so few transistors, the 6502 is generally viewed as considered at least twice as fast (or more) as the Z80 for the same clock speed [https://www.cpcwiki.eu/forum/amstrad-cpc-hardware/the-cpc-revision-zero-article/msg243843/ Source]. Two reasons can explain it:
* The 6502 has an 8-bit ALU while the Z80 has a 4-bit ALU.
* The 6502 has a built-in clock doubler, allowing it to perform 1 internal operation and 1 memory access per full-cycle. In contrast, the Z80 can only do at most one memory access per M-cycle, which takes 3 to 6 T-states. On average, a 2MHz 6502 can make 2 memory accesses per microsecond, while a 4MHz Z80 can only make 1 in the same time.