Home | Amazing | Today | Tags | Publishers | Years | Account | Search 
Hacker's Delight

Buy
Hacker's Delight, 9780201914658 (0201914654), Addison Wesley, 2002

This is a collection of small programming tricks that I have come across over many years. Most of them will work only on computers that represent integers in two's-complement form. Although a 32-bit machine is assumed when the register length is relevant, most of the tricks are easily adapted to machines with other register sizes.

This book does not deal with large tricks such as sophisticated sorting and compiler optimization techniques. Rather, it deals with small tricks that usually involve individual computer words or instructions, such as counting the number of 1-bits in a word. Such tricks often use a mixture of arithmetic and logical instructions.

It is assumed throughout that integer overflow interrupts have been masked off, so they cannot occur. C, Fortran, and even Java programs run in this environment, but Pascal and ADA users beware! The presentation is informal. Proofs are given only when the algorithm is not obvious, and sometimes not even then. The methods use computer arithmetic, "floor" functions, mixtures of arithmetic and logical operations, and so on. Proofs in this domain are often difficult and awkward to express. To reduce typographical errors and oversights, many of the algorithms have been executed. This is why they are given in a real programming language, even though, like every computer language, it has some ugly features. C is used for the high-level language because it is widely known, it allows the straightforward mixture of integer and bit-string operations, and C compilers that produce high-quality object code are available.

Occasionally, machine language is used. It employs a three-address format, mainly for ease of readability. The assembly language used is that of a fictitious machine that is representative of today's RISC computers.

Branch-free code is favored. This is because on many computers, branches slow down instruction fetching and inhibit executing instructions in parallel. Another problem with branches is that they may inhibit compiler optimizations such as instruction scheduling, commoning, and register allocation. That is, the compiler may be more effective at these optimizations with a program that consists of a few large basic blocks rather than many small ones.

(HTML tags aren't allowed.)

Thinking Animation: Bridging the Gap Between 2D and CG
Thinking Animation: Bridging the Gap Between 2D and CG
Learn how to think before you animate. Thinking Animation is a one-of-a-kind book that emphasizes how artists can use traditional animation techniques and principles with the computer generated animation technology of today. Written by seasoned animators with experience in both 2D and CG, Thinking Animation is an exquisite guide aimed at...
Differential Diagnosis in Orthopaedic Oncology
Differential Diagnosis in Orthopaedic Oncology

This volume presents both the radiologist's and the pathologist's approach to differential diagnosis of musculoskeletal tumors and tumor-like lesions and details the radiologic and histopathologic features helpful in confirming a diagnosis. The book is illustrated with over 1,200 radiographs, CT and MR images, full-color...

Raspberry Pi Embedded Projects Hotshot
Raspberry Pi Embedded Projects Hotshot

This book is targeted towards beginners and intermediate designers of mechatronic systems and embedded system design. Some familiarity with the Raspberry Pi and Python programming is preferred but not required.

The Raspberry Pi is a quaint example of technological innovations that come by once every two or three decades and set off...


GlassFish Administration
GlassFish Administration
To build a powerful production environment for your Java EE systems, you need a great application server, and the skills to manage it. This book gives you all that you are looking for.

This book will help you gain the necessary skills to install, configure, tune, and troubleshoot GlassFish so that you can fully unleash its power. It will
...
Xcode 4 iOS Development Beginner's Guide
Xcode 4 iOS Development Beginner's Guide

The iPhone is one of the hottest mobile devices on the planet. Whether you are just starting out with iPhone Development or already have some knowledge in this area, you will benefit from what this book covers. Using this book's straightforward, step-by-step approach, you will go from Xcode 4 apprentice to Xcode 4 Jedi master in no...

PowerPoint 2007 Bible
PowerPoint 2007 Bible

Creating a good presentation is much more than just clicking a few dialog boxes and typing some text. It requires knowledge and planning-lots of it. With the PowerPoint 2007 Bible you will not only be able to build a presentation with PowerPoint, but you’ll also be able to explain why you made the choices you did, and you’ll...

©2021 LearnIT (support@pdfchm.net) - Privacy Policy