Early computers used relays, or delay lines for main memory functions. Ultrasonic delay line could only reproduce data in the order it was written. Drum memory could be expanded at low cost but retrieval of non-sequential memory items required knowledge of the physical layout of the drum to optimize speed. latches built out of vacuum tube triodes, and later, out of discrete transistors, were used for smaller and faster memories such as random-access register banks and registers. such registers were relatively large, power-hungry and too costly to use for large amounts of data; generally only a few hundred or few thousand bits of such memory could be provided.