lumping vacuum tubes together with relays is a fundamental misunderstanding, and this misunderstanding has led you to make a statement that is false by about three or four orders of magnitude

electromagnetic relays can switch at up to a few kilohertz, while some vacuum tubes can switch at up to a few gigahertz—billions of cycles per second—though most of them can only handle signals up in the megahertz. in world war ii, before the first computer¹, people were already using vacuum tubes to produce, amplify, and decode multi-gigahertz radio signals. typically such microwave tubes only have a bandwidth of an octave or less; they don't work down to dc with the same transition times, a problem that also afflicts transistors

the ibm 709 https://en.wikipedia.org/wiki/IBM_709 was a vacuum-tube computer delivered in 01958 which was capable of 42000 arithmetic operations per second. this is literally ten thousand times faster than the '3–10 operations per second' you remember from the youtube videos you have occasionally seen. the 709 wasn't the fastest vacuum-tube computer; the enormous an/fsq-7 reached 75000 instructions per second. and, as i understand it, in the 709, the limiting factor wasn't the vacuum tubes, which could switch a great deal faster than that, but the core memory—the only part of the entire machine that used any transistors

the an/fsq-7 contained sixty thousand tubes. i haven't been able to find a citation for the total number of tubes in the 709. http://www.bitsavers.org/pdf/brl/compSurvey_Mar1961/brlRepor... says its arithmetic unit contained 2000 tubes and 14500 diodes. the cathode heating filaments in the https://en.wikipedia.org/wiki/7AK7 tubes used in many contemporary computers were about six watts each, and the whole machine used about a hundred kilowatts, so it couldn't have had more than about fifteen or twenty thousand tubes in it; my guess is that it had most of that number

a variety of schemes for computing at microwave frequencies were considered in the 01950s, but not adopted, in large part because of the absence of sufficiently large memories that could work at those speeds. the cycle time for core memory remained in the microsecond range from its invention until intel finally displaced it with sram in the 70s

unless you are very young, you have probably seen a cathode-ray tube television set, perhaps even a cathode-ray tube computer monitor. you may be unaware that cathode-ray tubes are a kind of vacuum tube, and that ntsc broadcast is about 5 million pels per second, so that single vacuum tube is successfully processing a signal of a few megahertz—down to dc, since it can successfully display either a solid white screen or a solid black screen. knowing this, it should now be inconceivable to you that vacuum-tube computers could have been limited to 3–10 operations per second. but there's more; the monochrome version of the ntsc standard is from 01941, and not just the data transfer from the electron-gun signal onto the screen but also the radio-frequency demodulation of that signal was being done by vacuum tubes, and not in military or scientific equipment, but in mass-market home appliances!

(525 lines by about 700 pels per line at 30 frames per second would give you 15 million pels per second, implying frequencies up to 7.5 megahertz, but actual ntsc signals are bandlimited to less than 6 megahertz, so the horizontal definition is quite a bit poorer than the vertical)

tubes weren't the only game in town, either. the square-loop ferrite used for core memory was also capable of solid-state digital logic, which won't surprise you if you know how core memory works. it was in fact commonly used for digital logic throughout the 01960s, especially in the soviet union, usually in combination with semiconductor diodes, which had been in wide use for radio electronics since the 01920s, long before the transistor. (bose's original 60-gigahertz submillimeter radio experiments in 01895 used semiconductor diodes https://en.wikipedia.org/wiki/Jagadish_Chandra_Bose#Microwav... but it took quite a while to simplify the apparatus to the point that it completely displaced coherers and electrolytic detectors.) as i understand it, in such 'ferrite–diode' systems, the ferrite provided logical inversion, state (memory), and amplification, while diodes provided all the combinational logic, just as diodes did in some vacuum-tube computers like the lgp-30 (3800 additions per second on 113 vacuum tubes: a twentieth of the performance of the an/fsq-7 for a 500th of the number of tubes). what eventually killed ferrite–diode systems, as i understand it, was the same performance ceiling that killed core memory

but many older atx power supplies still contain magnetic amplifiers, so-called 'magamps', which don't require square-loop ferrite. magamps were also used in the guidance systems for the wwii v-2 rocket

other digital logic technologies that have been used include pneumatic, fluidic, and neon-tube logic, but all of these are much slower than vacuum tubes, transistors, and even the magnetic logic types described above

computer architecture has vastly improved since the 01950s. if you were to build a computer out of 5200 vacuum tubes and 18000 diodes (like the 01958 univac ii, which also included 1200 transistors) you could surely implement a bit-parallel rv32iczmmul with dual-tube flip-flops for all the register bits and a very small instruction cache (say, 16 16-bit compressed instructions, 256 bits stored in 512 tubes) and run at several million instructions per second as long as you didn't have to touch core, instead of the 6000 that the univac ii did. but instruction caches hadn't been invented yet, univac ii was bit-serial and bcd, and the cdc 6600 was years in the future

so we've gotten about three orders of magnitude speedup from architectural improvements, quite aside from switching elements going faster. but early transistors weren't any faster than contemporary vacuum tubes; in fact, most discrete transistors still can't handle microwave frequencies. the main thing that is responsible for the transition from kiloflops on the desktop² to teraflops is not transistors but miniaturization. in the 01930s, people were already miniaturizing vacuum tubes to 'acorn tubes' to get them to run successfully at gigahertz frequencies. transistors are more amenable to miniaturization than vacuum tubes or relays, it's true, but nanometer-sized electrostatic relays would only be about an order of magnitude slower

as i mentioned above, wikipedia says that the univac i and a lot of other early vacuum tube computers used the not-at-all-miniaturized sylvania 7ak7 tube; as i read the datasheet at https://web.archive.org/web/20221114011216/http://www.nj7p.o... it has an input capacitance of 12 picofarads, passes about 35 milliamps when fully on, and turns all the way off when you bring the control grid to -11 volts. so if you had one tube like this driving the control grids of two other tubes, i think you'd get a transition time of about 8 nanoseconds (60 megahertz) if the tubes were the part of the circuit that limited the speed. but i don't understand how vacuum-tube logic circuits work, so i might be off by an order of magnitude here

corrections on any of this would be most welcome

______

¹ possibly someone will post a correction to this based on the fact that there were things called 'computers' before the zuse z4, the johnniac, the pilot ace, and the eniac's transition to programmability. yes, there were, but those things were not the things we call 'computers' today, which are machines capable of turing-complete computation up to their memory limits. volume 2 of the first edition of the oxford english dictionary, published in 01893, contains a definition for 'computer', one which was later extended to all kinds of machines used for calculating; the copy i scanned is at https://archive.org/details/oed02arch/page/750/mode/1up?view.... but the things we call 'computers' today did not exist at that time or at the beginning of world war ii. zuse's z3 from 01941 was discovered to be in some theoretical sense turing-complete decades later

² or under it, in the case of the lgp-30, which was the desk