• Complain

Randall Hyde - Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level

Here you can read online Randall Hyde - Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2006, publisher: No Starch Press, genre: Computer. 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.

Randall Hyde Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level
  • Book:
    Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level
  • Author:
  • Publisher:
    No Starch Press
  • Genre:
  • Year:
    2006
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

The second volume in the Write Great Code series supplies the critical information that todays computer science students dont often get from college and university courses: How to carefully choose their high-level language statements to produce efficient code. Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level, teaches software engineers how compilers translate high-level language statements and data structures into machine code. Armed with this knowledge, a software engineer can make an informed choice concerning the use of those high-level structures to help the compiler produce far better machine code--all without having to give up the productivity and portability benefits of using a high-level language.

Randall Hyde: author's other books


Who wrote Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level? Find out the surname, the name of the author of the book and a list of all author's works by series.

Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level — 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 "Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level" 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.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Write Great Code, Volume 2
Randall Hyde
Published by No Starch Press
Acknowledgments

Originally, the material in this book was intended to appear as the last chapter of Write Great Code, Volume 1 . Hillel Heinstein, the developmental editor for Volume 1, was concerned that the chapter was way too long and, despite its length, did not do the topic justice. We decided to expand the material and turn it into a separate volume, so Hillel is the first person I must acknowledge for this books existence.

Of course, turning a 200-page chapter into a complete book is a major undertaking, and there have been a large number of people involved with the production of this book. Id like to take a few moments to mention their names and the contributions theyve made.

Mary Philips, a dear friend who helped me clean up The Art of Assembly Language , including some material that found its way into this book.

Bill Pollock, the publisher, who believes in the value of this series and has offered guidance and moral support.

Elizabeth Campbell, production manager and my major contact at No Starch, who has shepherded this project and made it a reality.

Kathy Grider-Carlyle, the editor, who lent her eyes to the grammar.

Jim Compton, the developmental editor, who spent considerable time improving the readability of this book.

Stephanie Provines, whose proofreading caught several typographical and layout errors.

Riley Hoffman, who handled the page layout chores and helped ensure that the book (especially the code listings) was readable.

Christina Samuell, who also worked on the books layout and provided lots of general production help.

Benjamin David Lunt, the technical reviewer, who helped ensure the technical quality of this book.

Leigh Poehler and Patricia Witkin, wholl handle the sales and marketing of this book.

I would also like to acknowledge Susan Berge and Rachel Gunn, former editors at No Starch Press. Although they moved on to other positions before getting to see the final product, their input on this project was still valuable.

Finally, I would like to dedicate this book to my nieces and nephews: Gary, Courtney (Kiki), Cassidy, Vincent, Sarah Dawn, David, and Nicholas. I figure they will get a kick out of seeing their names in print.

Introduction

There are many aspects of great codefar too many to describe properly in a single book. Therefore, this second volume of the Write Great Code series concentrates on one important part of great code: performance. As computer systems have increased in performance from MHz, to hundreds of MHz, to GHz, the performance of computer software has taken a back seat to other concerns. Today, it is not at all uncommon for software engineers to exclaim, You should never optimize your code! Funny, you dont hear too many computer application users making such statements.

Although this book describes how to write efficient code, it is not a book about optimization. Optimization is a phase near the end of the software development cycle in which software engineers determine why their code does not meet performance specifications and then massage the code to achieve those specifications. But unfortunately, if no thought is put into the performance of the application until the optimization phase, its unlikely that optimization will prove practical. The time to ensure that an application has reasonable performance characteristics is at the beginning, during the design and implementation phases. Optimization can fine-tune the performance of a system, but it can rarely deliver a miracle.

Although the quote is often attributed to Donald Knuth, who popularized it, it was Tony Hoare who originally said, Premature optimization is the root of all evil. This statement has long been the rallying cry of software engineers who avoid any thought of application performance until the very end of the software-development cycleat which point the optimization phase is typically ignored for economic or time-to-market reasons. However, Hoare did not say, Concern about application performance during the early stages of an applications development is the root of all evil. He specifically said premature optimization , which, back then, meant counting cycles and instructions in assembly language codenot the type of coding you want to do during initial program design, when the code base is rather fluid. So, Hoares comments were on the mark. The following excerpt from a short essay by Charles Cook (www.cookcomputing.com/blog/archives/000084.html) describes the problem with reading too much into this statement:

Ive always thought this quote has all too often led software designers into serious mistakes because it has been applied to a different problem domain to what was intended.

The full version of the quote is We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. and I agree with this. Its usually not worth spending a lot of time micro-optimizing code before its obvious where the performance bottlenecks are. But, conversely, when designing software at a system level, performance issues should always be considered from the beginning. A good software developer will do this automatically, having developed a feel for where performance issues will cause problems. An inexperienced developer will not bother, misguidedly believing that a bit of fine tuning at a later stage will fix any problems.

Hoare was really saying that software engineers should worry about other issues, like good algorithm design and good implementations of those algorithms, before they worry about traditional optimizations, like how many CPU cycles a particular statement requires for execution.

Although you could certainly apply many of this books concepts during an optimization phase, most of the techniques here really need to be done during initial coding. If you put them off until you reach code complete, its unlikely they will ever find their way into your software. Its just too much work to implement these ideas after the fact.

This book will teach you how to choose appropriate high-level language (HLL) statements that translate into efficient machine code with a modern optimizing compiler. With most HLLs, using different statements provides many ways to achieve a given result; and, at the machine level, some of these ways are naturally more efficient than others. Though there may be a very good reason for choosing a less-efficient statement sequence over a more efficient one (e.g., for readability purposes), the truth is that most software engineers have no idea about the runtime costs of HLL statements. Without such knowledge, they are unable to make an educated choice concerning statement selection. The goal of this book is to change that.

An experienced software engineer may argue that the implementation of these individual techniques produces only minor improvements in performance. In some cases, this evaluation is correct; but we must keep in mind that these minor effects accumulate. While one can certainly abuse the techniques this book suggests, producing less readable and less maintainable code, it only makes sense that, when presented with two otherwise equivalent code sequences (from a system design point of view), you should choose the more efficient one. Unfortunately, many of todays software engineers dont know which of two implementations actually produces the more efficient code.

Though you dont need to be an expert assembly language programmer in order to write efficient code, if youre going to study compiler output (as you will do in this book), youll need at least a reading knowledge of it. provide a quick primer for 80x86 and PowerPC assembly language.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level»

Look at similar books to Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level. 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.


Reviews about «Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level»

Discussion, reviews of the book Write Great Code, Volume 2: Thinking Low-Level, Writing High-Level 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.