> a comparison of TAOCP and CLRS

The two are hard to compare, IMO, because their approaches and intended audience are different. CLRS is an undergraduate/graduate textbook on algorithms, where the authors have selected a broad range of topics based on things like their suitability for teaching or coursework. TAOCP on the other hand treats a narrower (and rather different) set of topics in greater depth, each section being essentially one person's excellent distillation of all published literature on the topic, passed through a tasteful interestingness+usefulness filter, and presented in expository style. To expand on that:

* CLRS treats algorithms as an academic subject in its own right, while Knuth is more concerned about what is actually useful to a programmer who is interested in writing efficient programs. For example, CLRS has an entire chapter on Fibonacci heaps (and the 2nd edition also had one on binomial heaps), which are great theoretically (amortized constant time for some operations), but impractical to implement and (because of the constant factors) hardly worth using in practice. In TAOCP you'll not find them mentioned. (Though there are Fibonacci trees, the search trees that arise as a result of a simple and easy-to-implement algorithm called Fibonaccian search.)

* Compare the table of contents: https://en.wikipedia.org/w/index.php?title=Introduction_to_A... versus https://en.wikipedia.org/w/index.php?title=The_Art_of_Comput... (Knuth wrote down the table of contents in 1962 and has been writing to it ever since; the ToC of CLRS is of course a function of present-day fashions among algorithms researchers.)

* Roughly, CLRS, like algorithms researchers, treat algorithms as a branch of mathematics, following the idea-theorem-proof structure (and sometimes overdoing it: https://www.goodreads.com/review/show/155959101), writing only pseudocode, etc. It is possible to go through the entire book without ever writing a program or even feeling the urge to write one. (Not saying that's wrong.) Your thinking stays at a uniform level, roughly the "idea" level of thinking about the algorithm and what it does, proving things about it, etc. In TAOCP it's common to find an idea/algorithm described on one page informally, then a page later (rarely, when warranted: https://news.ycombinator.com/item?id=14520230) have an implementation in assembly language (MIX/MMIX), with a pointer to an exercise that asks you to analyze how many times a certain register is modified or whatever. In TAOCP, we always have mathematics in the service of algorithms -- the idea is to take an actual algorithm/program that can be implemented, then analyze it using whatever mathematical tools it takes (many of which were invented by Knuth... in fact at one point he wanted to name the books "Analysis of Algorithms", but the publishers didn't think the title would sell).

* For a concrete example: just last week I read TAOCP's section on tries (Chapter 6 Searching (Vol 3), part 6.3 "Digital Searching"). In CLRS there's a passing mention of tries (radix trees) only in one paragraph (Problem 12-2 in Chapter 12 Binary Search Trees), which asks to prove that using this data structure a bunch of binary strings of total length n can be sorted in O(n) time. This makes sense I guess because mathematically/asymptotically there may not be much more to say about them. But they are an eminently useful data structure that are practical to implement, and can make programs fast (only by a "constant factor" but that's what a real programmer cares about). So TAOCP spends about two pages explaining tries (with a useful diagram) and in fact their implementation as a bunch of arrays (not as a tree), then gives a MIX program to make it even more concrete, then some concrete numbers and words about when they're appropriate, and some history, goes into more depth on the specialization to the binary case, proceeds to explain PATRICIA tries (another practical data structure). All this takes 9 pages. Then there are 7 pages of mathematical analysis (leading to conclusions like, for example, a trie search inspects an average of lg N + 1.33 bits for a successful search and lg N − 0.11 for an unsuccessful one). Then there are 6 pages of exercises giving further ideas, all of which have at least brief solutions at the back of the book (~8 pages). Any of these (the assembly program, the mathematical analysis) you can easily skip if you're not interested, and still get something something of value as a working programmer. (If you want to implement your own searches that is... if all you do is use libraries written by others for writing CRUD applications none of this may be relevant much but that's the same for CLRS too.)