3 ms·
Unfortunately no source code. I've thought about how this might be implemented. The video says there are 3000 items; the IBM 1401 only has 4000 characters of me
by kens 5y ago
Unfortunately no source code. I've thought about how this might be implemented. The video says there are 3000 items; the IBM 1401 only has 4000 characters of memory (unless it has the 12,000 character expansion memory box, which I didn't see in the video). So most of the data must be on magnetic tape. At 15000 characters per second, ten seconds of processing would permit 50 characters per item, which seems reasonable.
So my theory is that the program runs through the 3000 records on tape and matches (ranks) them against the customer's input. It could keep track of the current top 10 matches as it goes through. Then it can print them out at the end. (I'd expect some pseudo-randomness so customers don't get the same results.)
Of course, they could do something simple, such as having a small number of pre-computed lists and just print one based on the customer's input.
- beachy 5y agoSo basically a full table scan, where the table is stored on tape instead of DASD. Sounds very plausible!
- xxs 5y agoNo, if 10 items are to be kept - that would be a select sort, heap one was invented in the same decade but later. With the amount of items to be printed kept in memory - just read the tape and grade the items vs. the current selection.
- Closi 5y agoThis sounds like an incredibly sensible approach. We can probably assume each gift was assigned a single gender too (and possibly a single age category). Would that have helped as they could then pre-sort the tape for speed? I assume a seek is faster than a read, but don’t know enough about the architecture!
- tyingq 5y agoThere's more than one tape drive, so they could have "sharded" on gender, for example.