Henry S. Warren - Hackers delight
Here you can read online Henry S. Warren - Hackers delight full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2003, publisher: Addison-Wesley Professional, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:
Romance novel
Science fiction
Adventure
Detective
Science
History
Home and family
Prose
Art
Politics
Computer
Non-fiction
Religion
Business
Children
Humor
Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.
- Book:Hackers delight
- Author:
- Publisher:Addison-Wesley Professional
- Genre:
- Year:2003
- Rating:5 / 5
- Favourites:Add to favourites
- Your mark:
- 100
- 1
- 2
- 3
- 4
- 5
Hackers delight: summary, description and annotation
We offer to read an annotation, description, summary or preface (depends on what the author of the book "Hackers delight" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.
Hackers delight — read online for free the complete book (whole text) full work
Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Hackers delight" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.
Font size:
Interval:
Bookmark:
Publisher: Addison Wesley
Pub Date: July 17, 2002
ISBN: 0-201-91465-4
"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."-Josh 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." -Guy Steele
These are the timesaving techniques relished by computer hackers-those devoted and persistent code developers who seek elegant and efficient ways to build better software. The truth is that much of the computer programmer's job involves a healthy mix of arithmetic and logic. In Hacker's Delight, veteran programmer Hank Warren shares the tricks he has collected from his considerable experience in the worlds of application and system programming. Most of these techniques are eminently practical, but a few are included just because they are interesting and unexpected. The resulting work is an irresistible collection that will help even the most seasoned programmers better their craft.
Topics covered include:
A broad collection of useful programming tricks
Small algorithms for common tasks
Power-of-2 boundaries and bounds checking
Rearranging bits and bytes
Integer division and division by constants
Some elementary functions on integers
Gray code
Hilbert's space-filling curve
And even formulas for prime numbers!
This book is for anyone who wants to create efficient code. Hacker's Delight will help you learn to program at a higher level-well beyond what is generally taught in schools and training courses-and will advance you substantially further than is possible through ordinary self-study alone.
Many of the designations used bymanufacturers and sellers to distinguish their products are claimed astrademarks. Where those designations appear in this book, and Addison-Wesleywas aware of a trademark claim, the designations have been printed with initialcapital letters or in all capitals.
The author and publisher have taken care inthe preparation of this book, but make no expressed or implied warranty of anykind and assume no responsibility for errors or omissions. No liability isassumed for incidental or consequential damages in connection with or arisingout of the use of the information or programs contained herein.
The publisher offers discounts on this bookwhen ordered in quantity for special sales. For more information, pleasecontact:
U.S. Corporate and Government Sales
(800) 382-3149
For sales outside of the U.S., pleasecontact:
International Sales
(317) 581-3793
Visit Addison-Wesley on the Web: www.awprofessional.com
Library of Congress Cataloging-in-PublicationData
Warren, Henry S.
Hacker's delight / Henry S. Warren, Jr.
p. cm.
Includes bibliographical references andindex.
1. Computer programming. I. Title.
QA76.6 .W375 2002
005.1dc21
2002066501
Copyright 2003 by Pearson Education, Inc.
All rights reserved. No part of thispublication may be reproduced, stored in a retrieval system, or transmitted, inany form, or by any means, electronic, mechanical, photocopying, recording, orotherwise, without the prior consent of the publisher. Printed in the United States of America . Publishedsimultaneously in Canada .
For information on obtaining permission foruse of material from this work, please submit a written request to:
Pearson Education, Inc.
Rights and Contracts Department
75 Arlington Street, Suite 300
Boston , MA 02116
Fax: (617) 848-7047
Text printed on recycled paper
1 2 3 4 5 6 7 8 9 10MA0605040302
First printing, July 2002
To Joseph W. Gauld,my high school algebra teacher, for sparking in me a delight in the simplethings in mathematics.
When I first got a summer job at MIT'sProject MAC almost 30 years ago, I was delighted to be able to work with theDEC PDP-10 computer, which was more fun to program in assembly language thanany other computer, bar none, because of its rich yet tractable set ofinstructions for performing bit tests, bit masking, field manipulation, andoperations on integers. Though the PDP-10 has not been manufactured for quitesome years, there remains a thriving cult of enthusiasts who keep old PDP-10hardware running and who run old PDP-10 softwareentire operating systems andtheir applicationsby using personal computers to simulate the PDP-10instruction set. They even write new software; there is now at least one Website whose pages are served up by a simulated PDP-10. (Come on, stoplaughingit's no sillier than keeping antique cars running.)
I also enjoyed, in that summer of 1972,reading a brand-new MIT research memo called HAKMEM, a bizarre and eclecticpotpourri of technical trivia. [1] Thesubject matter ranged from electrical circuits to number theory, but whatintrigued me most was its small catalog of ingenious little programming tricks.Each such gem would typically describe some plausible yet unusual operation onintegers or bit strings (such as counting the 1-bits in a word) that couldeasily be programmed using either a longish fixed sequence of machineinstructions or a loop, and then show how the same thing might be done muchmore cleverly, using just four or three or two carefully chosen instructionswhose interactions are not at all obvious until explained or fathomed. For me,devouring these little programming nuggets was like eating peanuts, or ratherbonbonsI just couldn't stopand there was a certain richness to them, a certainintellectual depth, elegance, even poetry.
[1] Why "HAKMEM"? Short for "hacks memo"; one36-bit PDP-10 word could hold six 6-bit characters, so a lot of the namesPDP-10 hackers worked with were limited to six characters. We were used toglancing at a six-character abbreviated name and instantly decoding thecontractions. So naming the memo "HAKMEM" made sense at the timeatleast to the hackers.
"Surely," I thought, "theremust be more of these," and indeed over the years I collected, and in somecases discovered, a few more. "There ought to be a book of them."
I was genuinely thrilled when I saw HankWarren's manuscript. He has systematically collected these little programmingtricks, organized them thematically, and explained them clearly. While some ofthem may be described in terms of machine instructions, this is not a book onlyfor assembly language programmers. The subject matter is basic structuralrelationships among integers and bit strings in a computer and efficienttechniques for performing useful operations on them.
These techniques are just as useful in the Cor Java programming languages as they are in assembly language.
Many books on algorithms and data structuresteach complicated techniques for sorting and searching, for maintaining hashtables and binary trees, for dealing with records and pointers. They overlookwhat can be done with very tiny pieces of databits and arrays of bits. It isamazing what can be done with just binary addition and subtraction and maybesome bitwise operations; the fact that the carry chain allows a single bit toaffect all the bits to its left makes addition a peculiarly powerful datamanipulation operation in ways that are not widely appreciated.
Yes, there ought to be a book about thesetechniques. Now it is in your hands, and it's terrific. If you write optimizingcompilers or high-performance code, you must read this book. You otherwisemight not use this bag of tricks every single daybut if you find yourself stuckin some situation where you apparently need to loop over the bits in a word, orto perform some operation on integers and it just seems harder to code than itought, or you really need the inner loop of some integer or bit-fiddlycomputation to run twice as fast, then this is the place to look. Or maybeyou'll just find yourself reading it straight through out of sheer pleasure.
Font size:
Interval:
Bookmark:
Similar books «Hackers delight»
Look at similar books to Hackers delight. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.
Discussion, reviews of the book Hackers delight and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.