Data processing in electronics depends on binary on/off switches. Modern electronics use semiconductor transistors, which switch on a nanosecond timescale. Despite progress in recent decades to increase the semiconductor switching rate, their information processing is limited to gigahertz speed. But new research published in Science Advances introduces an optical switch that is much, much faster. This optical switch leverages the ability of fused silica to sustain instantaneous changes in its reflectivity. Using ultrafast lasers, the team could register changes happening as fast as once every few hundred attoseconds (one billionth of a billionth of a second). In experiments, the team successfully encoded binary data on ultrafast laser pulses to increase data transfer speed well beyond the timescale of semiconductor electronics, which could also someday be used for long-distance communications, like from earth to deep space. While more work is needed to miniaturize the attosecond optical switch and the ultrafast encoding devices, future electronics with optical transistors could have processing speeds shortened by several orders of magnitude compared to current technology and usher in a new realm of information and communication technology.