Thursday, January 2, 2014

Hacker's Delight 2nd Edition

I covered the book Hacker's Delight (1st Edition) in the past. So wanted to mention that there is now a expanded second edition.

This book is about obscure high efficiency ways to write code. If your looking for ways to do things you shouldn't, this is not the book you are looking for.

  • A new chapter on cyclic redundancy checking (CRC), including routines for the commonly used CRC-32 code
  • A new chapter on error correcting codes (ECC), including routines for the Hamming code
  • More coverage of integer division by constants, including methods using only shifts and adds
  • Computing remainders without computing a quotient
  • More coverage of population count and counting leading zeros
  • Array population count
  • New algorithms for compress and expand
  • An Least Recently Used [LRU; Cache] algorithm
  • Floating-point to/from integer conversions
  • Approximate floating-point reciprocal square root routine
  • A gallery of graphs of discrete functions
  • Now with exercises and answers