Automotive Holiday Deals Up to 50% Off Select Books Shop Men's Athletic Shoes Learn more nav_sap_SWP_6M_fly_beacon Black Friday egg_2015 All-New Amazon Fire TV Luxury Beauty Gifts Under $50 Amazon Gift Card Offer bf15 bf15 bf15 $30 Off Amazon Echo $15 Off All-New Fire Kindle Black Friday Deals Outdoor Deals on DOTD

Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your email address or mobile phone number.

Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

Code Optimization: Effective Memory Usage Paperback – September 1, 2003

4 customer reviews

See all 2 formats and editions Hide other formats and editions
New from Used from
"Please retry"
$417.22 $76.00

Best Books of the Year So Far
Looking for something great to read? Browse our editors' picks for 2015's Best Books of the Year in fiction, nonfiction, mysteries, children's books, and much more.

Special Offers and Product Promotions

  • Take an Extra 30% Off Any Book: Use promo code HOLIDAY30 at checkout to get an extra 30% off any book for a limited time. Excludes Kindle eBooks and Audible Audiobooks. Restrictions apply. Learn more | Shop now

Editorial Reviews

About the Author

Kris Kaspersky is a technical writer and the author of articles on various aspects of hacking, disassembling, and code optimization. He has dealt with many issues relating to security and system programming including compiler development, optimization techniques, security mechanism research, real-time OS kernel creation, and writing antivirus programs.

Hero Quick Promo
Holiday Deals in Kindle Books
Save up to 85% on more than 1,000 Kindle Books. These deals are valid until November 30, 2015. Learn more

Product Details

  • Paperback: 400 pages
  • Publisher: A-List Publishing (September 1, 2003)
  • Language: English
  • ISBN-10: 1931769249
  • ISBN-13: 978-1931769242
  • Product Dimensions: 0.8 x 7.5 x 9.2 inches
  • Shipping Weight: 1.6 pounds
  • Average Customer Review: 4.8 out of 5 stars  See all reviews (4 customer reviews)
  • Amazon Best Sellers Rank: #2,505,399 in Books (See Top 100 in Books)

Important Information

Example Ingredients

Example Directions

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

5 star
4 star
3 star
2 star
1 star
See all 4 customer reviews
Share your thoughts with other customers

Most Helpful Customer Reviews

9 of 9 people found the following review helpful By Olivier Langlois on June 2, 2007
Format: Paperback
This book has been a revelation to me. Prior to read this book, all I knew was that memory access was expensive. This book will teach you how to organize your data in memory and how to access it to improve your program performance and most of the time without having to use assembly programming. It covers x86 memory organization and the interface between the processor and the memory and there is a whole chapter covering x86 processor cache memory. To me, the most shocking information contained in this book is a C implementation of memcpy() that outbeats VC++ implementation by 25%-30%!!!

This book is not for novices but if you are ready to change your perception forever of the x86 programming, this book is highly recommended!
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
7 of 7 people found the following review helpful By J Jacob Jingleheimer Schmidt on March 2, 2006
Format: Paperback
I've recently read this book and found it rather illuminating; every chapter had something I've learned from. As to CompierGuy's review, yes, with great surprise I did see this silly statement he's quoting; and indeed the idea that optimization can eliminate most programming bugs is preposterous. However, it is an isolated incident -- even the chapter it's in is very enlightening overall (for example, if you ever wondered, but couldn't figure out, why VC's TRACE macro resolves to what it resolves to, after reading this chapter you will understand). And so I think the silly "optimization" phrase can be ascribed to the substandard translation/editing: the publisher, A-list, seems to be a cheesy russian outfit trying to capitalize on the rapidly passing computing fad by printing a lot of padded junk with the word "Hacking" in the titles. That said, I think Kaspersky's books are an exception to the rule, although I wish they were better translated/edited.

All in all, I feel "CompilerGuy" is unfair in his criticism: he says the list of egregious errors is too long to quote and comes up with a single example -- the one and only silly phrase. Having read this book, I think that CompilerGuy's review is groundless, but perhaps I'm wrong, and being always keen to learn more, I'd be interested to see a few more examples off of this mentioned but unsubstantiated, supposedly too-long-to-quote list of "painfully wrong statements, outright speculation, and serious lack of insight".

The bottom line: if you can get past unidiomatic writing and obvious snafus like the one quoted by CompilerGuy, you'll find the book useful; it has a lot of good information and thought of a rather uncommon for what's currently in print kind.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
3 of 4 people found the following review helpful By Lance C. Hibbeler on December 21, 2010
Format: Paperback Verified Purchase
These days, CPUs are so blazingly fast that accessing data from memory is the bottleneck in calculation time. To get around this, CPU manufacturers have introduced a memory hierarchy in the form of on-chip (or just off-chip) cache memory, which are small but fast memory banks. To truly write fast code, one must understand how these work and how to create algorithms and data structures that take advantage of the hardware. To this end, this book does an admirable job. Kaspersky discusses everything from the electrical engineering and hardware on up through coding and profiling of actual software. He gives useful optimization techniques and explains why they work. He compares some Intel and AMD processors (fairly, I might add), and a few popular C compilers.

Fair warning: the level of optimization discussed is what occurs at the end of software development- very fine tuning "it works, now let's make it work faster." Find the best algorithm for your application first, THEN explore what is in this book. This important point comes up in the opening chapter, but Kaspersky doesn't really harp on it as much as he probably should.

The text is a little dry but readable. There are several grammatical errors, probably due to translation. The wool is somewhat pulled over our eyes by hiding results in percentages. The text is organized in 3 giant chapters and one little one, each with numerous sections. The examples focus on integer math, so if you are interested in optimizing a scientific number-cruncher, this probably isn't for you (see instead something like Performance Optimization of Numerically Intensive Codes).
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
12 of 24 people found the following review helpful By Christian Beaumont on November 30, 2003
Format: Paperback
I have never seen any book take such a holistic approach to the art of optimization. Sure there are plenty of books out there that talk about loop unrolling, cache alignment and instruction scheduling, but there are none like this one. You'd better hold on tight though this book is not for the faint of heart. Kris takes you on a detailed tour of the memory architecture of contemporary (PIII, P4 and Athlon) machines, examining in great detail the precise costs associated with each and every memory access. Only in this book will you find a comparison of timing between DRAM, FPM, EDO BEDO, SDRAM, DDR SDRAM, RDRAM. The text although straight and to the point is sparingly littered with amusing and sometimes sarcastic comments that work well to lighten the deep subject matter.
My only complaints are that the text reads as if it has been translated from Russian (Which it probably has) and that there are too few chapters and too many sections.
If you are serious about optimization techniques - read this book.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse