Buy new:
$54.49$54.49
FREE delivery:
Tuesday, March 14
Ships from: Amazon.com Sold by: Amazon.com
Buy used: $48.27
Other Sellers on Amazon
+ $3.99 shipping
94% positive over last 12 months
Usually ships within 4 to 5 days.
+ $3.99 shipping
85% positive over last 12 months
Usually ships within 3 to 4 days.
+ $3.99 shipping
86% positive over last 12 months
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required. Learn more
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Hacker's Delight 2nd Edition
| Price | New from | Used from |
- eTextbook
$35.99 Read with Our Free App - Hardcover
$48.27 - $54.4919 Used from $35.95 8 New from $47.78
Enhance your purchase
In Hacker’s Delight, Second Edition, Hank Warren once again compiles an irresistible collection of programming hacks: timesaving techniques, algorithms, and tricks that help programmers build more elegant and efficient software, while also gaining deeper insights into their craft. 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.
Extensive additions in this edition include
- 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 LRU 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 .
- ISBN-100321842685
- ISBN-13978-0321842688
- Edition2nd
- PublisherAddison-Wesley Professional
- Publication dateSeptember 25, 2012
- LanguageEnglish
- Dimensions7.68 x 1.18 x 10.24 inches
- Print length512 pages
Customers who viewed this item also viewed
From the Publisher
Editorial Reviews
Review
“This is the first book that promises to tell the deep, dark secrets of computer arithmetic, and it delivers in spades. It contains every trick I knew plus many, many more. A godsend for library developers, compiler writers, and lovers of elegant hacks, it deserves a spot on your shelf right next to Knuth. In the ten years since the first edition came out, it’s been absolutely invaluable to my work at Sun and Google. I’m thrilled with all of the new material in the second edition.”
― Joshua Bloch
“When I first saw the title, I figured that the book must be either a cookbook for breaking into computers (unlikely) or some sort of compendium of little programming tricks. It’s the latter, but it’s thorough, almost encyclopedic, in its coverage. The second edition covers two new major topics and expands the overall collection with dozens of additional little tricks, including one that I put to use right away in a binary search algorithm: computing the average of two integers without risking overflow. This hacker is indeed delighted!”
― Guy Steele
About the Author
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 (SET Language) project under Jack Schwartz. Since 1973, Hank has been with IBM’s Research Division, focusing on compilers and computer architectures. He currently works on a supercomputer project aimed at an exaflop. Hank received his Ph.D. in computer science from the Courant Institute at New York University.
Product details
- Publisher : Addison-Wesley Professional; 2nd edition (September 25, 2012)
- Language : English
- Hardcover : 512 pages
- ISBN-10 : 0321842685
- ISBN-13 : 978-0321842688
- Item Weight : 2.95 pounds
- Dimensions : 7.68 x 1.18 x 10.24 inches
- Best Sellers Rank: #172,542 in Books (See Top 100 in Books)
- #8 in Computer Algorithms
- #36 in Programming Algorithms
- #115 in Computer Hacking
- Customer Reviews:
About the author

There's a short bio on the back cover of Hacker's Delight.
I want to point out here the existence of www.HackersDelight.org. This site will have errata files for the book (second edition) as errors are found. It has C code for the algorithms in the book and many similar algorithms.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on Amazon-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
All that being said, I LOVE THIS BOOK. It just slots in such a great place, between Knuth's "Concrete Mathematics" and the architectural guide for whatever whatever hardware you program in. I LOVE LOVE LOVE it.
What I got out of this:
Multiword multiplication for fast high precision fixed point on ARM chips that lack fpus, branchless integer min and max is very handy for Thumb mode, pre-computing magic numbers for division and modulus enables MUCH faster lookups in hash tables, the graphs of functions at the very end are super fascinating, and the superoptimizer this man wrote is very simple but incredibly fun to play with! I adapted it to use multithreading and it's helped me reduce some code to the simplest possible sequence. I've had special success in reducing switch cases or long conditions involving integer arithmetic.
Also I can definitely see uses for other things in the book, like the multibyte addition and the floating point chapter. Theres a little bit in there about the most famous bithack of them all. And the notation used is really clean.
This book is a gem and I hope we get more in the future. For now though I'll settle for leafing through and discovering the things I missed.
The book reads like a textbook and contains a lot of math. Most code is presented in assembly. Explanations are given but don't expect concrete answers. Getting a solution will require a bit of analysis on your part. if you don't like math or thinking things through, do not buy this book. If you have no experience with low/mid level languages, or bitwise operations, you may find yourself a little lost.
I loaned my first edition to a friend, which required that I purchase a copy of the second. The first is good and the second is better. Highly recommended.
I put Warren's book in the canon of the best works in the computer science field.
Highly recommended, not just because my copy of the first edition came with so many poorly-bound, loose pages.
-- wiredweird
Top reviews from other countries
If you are already a proficient programmer looking for ways to speed your code up this is an excellent resource that will be worth looking at. This is not really aimed at a beginner programmer or someone with limited mathematic skills.









