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.)

Talking Amongst Themselves Computer Communication Fundamentals
Talking Amongst Themselves Computer Communication Fundamentals
The building of ‘information superhighways’, in the first instance exemplified by the massive growth of the Internet, has introduced the general public to computers in communication. The end result is to allow the sharing of computer-based resources that are physically located in all parts of the world. From the point of view of most...
Java Persistence for Relational Databases
Java Persistence for Relational Databases

Java Persistence for Relational Databases is best practices and patterns for readers who want to connect to databases using Java. It also includes coverage of various database-related APIs for Java, including JDO, JDBC (including newest 3.0 APIs), and CMP (Container Managed Persistence with EJB).

Java Persistence for...

SharePoint 2003 User's Guide (Expert's Voice)
SharePoint 2003 User's Guide (Expert's Voice)
At DataLan Corporation, we spend a significant amount of time discussing a select group of people that we refer to as Professional Information Workers. We define this group as people who spend most of their working day creating documents and sending e-mail. Personally, I use a simple litmus test to identify Professional Information Workers; if you...

Beginning ASP.NET MVC 4
Beginning ASP.NET MVC 4

By now you’ll have heard of ASP.NET MVC. This exciting new approach to developing ASP.NET web applications has taken the development world by storm over the last few years. Now a mature technology suitable for mainstream use, its adoption has exploded in recent times.

Until recently, ASP.NET MVC was regarded as an advanced...

CCSP SECUR Exam Certification Guide (CCSP Self-Study, 642-501)
CCSP SECUR Exam Certification Guide (CCSP Self-Study, 642-501)
Prepare for the new CCSP SECUR 642-501 exam with the only Cisco authorized SECUR preparation guide available
  • The only SECUR guide developed in conjunction with Cisco, providing the most accurate and up-to-date topical coverage
  • Electronic testing engine on CD-ROM provides flexible assessment features and feedback on...
SQL Server Query Performance Tuning
SQL Server Query Performance Tuning

Queries not running fast enough? Wondering about the in-memory database features in 2014? Tired of phone calls from frustrated users? Grant Fritchey’s book SQL Server Query Performance Tuning is the answer to your SQL Server query performance problems. The book is revised to cover the very latest in performance optimization...

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