In Hacker's Delight, Second Edition long-time IBM Research programmer Henry Warren brings together irresistible collection of programming hacks: timesaving techniques, algorithms, and tricks that help programmers build more elegant and efficient software, while at the same time gain deeper insights into the craft of software. Warren's hacks are eminently practical, but they're also intrinsically interesting, and sometimes unexpected, much like the solution to a great puzzle. They are, in a word, a delight to any programmer who is excited by the opportunity to improve. They are designed to work with many contemporary languages, in any software development environment.
This edition adds new exercises and answers, plus extensive new coverage, including: * A new chapter on cyclic redundancy checking (CRC) * Routines for the commonly used CRC-32 code * A new chapter on error correcting codes (ECC) * Techniques for "hamming" code * More coverage of integer division by constants * Methods using only shifts and adds * Computing remainders without computing a quotient * More coverage of counting populations and leading zeros * Counting the 1-bits in an array * New algorithms for compress and expand * An LRU algorithm * Floating-point to/from integer conversions * Approximate floating-point reciprocal square root routine * A gallery of graphs of discrete functions
Henry S. Warren, Jr., has had a fifty-year career with IBM, spanning from the IBM 704 to the PowerPC and beyond. He has worked on various military command and control systems and on the SETL project under Jack Schwartz at New York University. Since 1973 he has been with IBM's Research Division, focusing on compilers and computer architectures. Hank currently works on a supercomputer project that is aiming at an exaflop. He received his Ph.D. in computer science from the Courant Institute at New York University.