> Anyway, at the time I did these measurements, my 4.2 GHz kaby lake had the fastest single-threaded performance of any machine you could buy but had worse latency than a quick machine from the 70s (roughly 6x worse than an Apple 2), which seems a bit curious. To figure out where the latency comes from, I started measuring keyboard latency because that’s the first part of the pipeline. My plan was to look at the end-to-end pipeline and start at the beginning, ruling out keyboard latency as a real source of latency.
> But it turns out keyboard latency is significant! I was surprised to find that the median keyboard I tested has more latency than the entire end-to-end pipeline of the Apple 2. If this doesn’t immedately strike you as absurd, consider that an Apple 2 has 3500 transistors running at 1MHz and an Atmel employee estimates that the core used in a number of high-end keyboards today has 80k transistors running at 16MHz. That's 20x the transistors running at 16x the clock speed -- keyboards are often more powerful than entire computers from the 70s and 80s! And yet, the median keyboard today adds as much latency as the entire end-to-end pipeline as a fast machine from the 70s.
This might be a bit off topic, but it was surprising to see a Logitech K120 have the same latency as a Unicomp Model M or other keyboards that are 5-10x more expensive than it.
No wonder I liked using it for work years ago: as far as membrane keyboards go, it's pretty dependable and decently nice to use, definitely so for it's price.
The measurement methodology seems a bit odd for the purposes of measuring the difference between old and new computers: if a large fraction of the latency measured is due to the key travel, that's latency which is also present in the older computers (AFAICT buckling spring has a lot more key travel before activation than the scissor-switch keys of the apple and most laptop keyboards) Surely for the purposes of the comparison you would want to look at switch activation-to-bus-activity latency.
> But it turns out keyboard latency is significant! I was surprised to find that the median keyboard I tested has more latency than the entire end-to-end pipeline of the Apple 2. If this doesn’t immedately strike you as absurd, consider that an Apple 2 has 3500 transistors running at 1MHz and an Atmel employee estimates that the core used in a number of high-end keyboards today has 80k transistors running at 16MHz. That's 20x the transistors running at 16x the clock speed -- keyboards are often more powerful than entire computers from the 70s and 80s! And yet, the median keyboard today adds as much latency as the entire end-to-end pipeline as a fast machine from the 70s.
https://danluu.com/keyboard-latency/