Glossary
EIP-5656 (MCOPY)
An Ethereum upgrade (Dencun) that added the MCOPY opcode — copies a region of memory in one opcode instead of a loop of MLOAD/MSTORE pairs.
Before EIP-5656, copying memory in the EVM required a manual loop of MLOAD / MSTORE pairs (or assembly that did the same). MCOPY performs the copy in a single opcode at much lower gas cost — useful for any contract that shuffles byte arrays, encodes ABI return data, or implements low-level libraries.
The opcode activated in the Dencun upgrade in March 2024 and is now used by modern Solidity, Vyper, and assembly libraries (Solady, Solmate) to dramatically reduce the gas cost of memory- heavy operations.