Laser pulses can trigger fast changes in magnetic state, facilitating new magnetic data storage and memory devices. This Review outlines the mechanisms of all-optical switching and the materials suitable for the optical control of magnetism and tests these mechanisms and materials in terms of speed, accompanying dissipations and scalability. Finally, the large-scale integration of devices in memory applications with low-energy dissipations is discussed.