On 06/04/2013 01:52 AM, Paul Birkel wrote:
Does anyone read/study Don Knuth's "Art
..." (TAOCP) any more? Sorting
using tape drives ... what fun! Memory, what memory ... don't need no
stinkin' memory!
Way Back When, I was detailed along with a co-worker to figure out what
to do when a government customer canceled a contract in mid-stride, but
was left with many units of bulk core storage, each unit being 4 million
words (40 million characters). Like most bulk core of the time, it was
rather slow first-access, but ran at full bandwidth once a block
transfer got started.
We figured that this incredible wealth of random-access memory (you
could use it to stare data via special read and write instructions, but
otherwise could not execute or use normal memory instructions to access
it.), much like a RAM Disk would allow us to use new and exotic
sort/merge methods. Curiously, the classical ones from Knuth (I recall
the fold-out-pages from the book showing timings of various sorts)
involving tapes also applied to this stuff--we couldn't come up with
anything that was better (remember the large start-up latency).
Fast-forward about a year--we were on a different system whose curious
(and idiotic) architecture was vector. The machine had scalar
operations, but they essentially were executed as vector operations of
length 1. So the darned thing would churn out vector results a
super-word (512 bits or 8 words) per cycle--ONCE IT GOT THE OPERATION
STARTED. In other words, all data accesses had the same latency, be
they a simple 1-word scalar or a 65Kword vector.
There, for a lot of things, Knuth went out the window. Selection sorts
for about n up to 1000 were fastest using vector instructions.
Quicksort was horrible for most practical values of n.
--Chuck