Amazon.com Customer Reviews
Substantial and comprehensive text - Review written on September 03, 2005
Rating: 4 out of 5
1 customer found this review helpful, 2 did not.
(...)
This is a substantial and comprehensive text on many aspects of Java Performance characteristics, explaining the effects of Java design and coding practices, and giving advice to help the Java Programmer design, code, and optimize applications to execute efficiently. It is not a programming tutorial for the novice, but will enhance the knowledge of an experienced programmer for Java specific concepts. Its goal is to explain how to tune existing programs to improve efficiency, but the explanation of the underlying Java Virtual Machine and the details of compiler code generation are so revealing that any developer will gain valuable insight into smart Java programming design.
The book consists of 537 pages divided into 19 chapters and is quite easy to understand for readers who have programming experience. Each chapter ends with a performance checklist section to summarize what you need to do with regard to that chapter's illumination.
The clearly organized chapters permit you to selectively read any of interest because they are mostly independent subjects. You can read a chapter on Strings and learn all about how these objects are implemented and the ramifications of various usages. It also addresses some algorithmic issues, such as sorting, garbage collection, and threading. I thought many of the revelations of code generation and object storage will seem obvious to programmers who have experience looking at generated code in other languages which will make for fast reading.
The very comprehensive nature of the book provides valuable information for all Java developers, and yet is helpful for just a quick understanding of particular Java issues. I enjoyed just reading through some of the chapters to confirm or enhance my understanding of particular execution characteristics.
(...)
I rate this book 4 out of 5 for programmers with Java experience.
Note: this book has nothing to do with Java Scripts.
Inaccurate, not worth the time or money - Review written on August 04, 2005
Rating: 2 out of 5
7 customers found this review helpful, 2 did not.
I saw many reviews of this book are full of praise but none of the reviewers actually mention having used it in large enterprise or production-ready systems! Huh, was the book written as an academic paper or a practical reference?
Many of the reviewers don't seem to have read the book to begin with. I had to really laugh at Bob Mann, he seems to have spent more time reading the reviews of this book in magazines than spending time to find the facts, or performance-tuning an app using the suggestions here. Looks like this guy has never supported any production system to know what kind of 'hairy' codes can be allowed in the codebase.
The performance comparisons provided in this book are confusing, inconclusive at the best, and many suggestions are just vaporware, no way to 'implement' those tunes.
Another reviewer, invalidated all criticisms that this book is useless for enterprise development, by enterprise developments I believe applications using EJB, JMS, RMI-IIOP, MVC/Struts are all covered, show me a single line written in this book which covers performance problems encountered in these areas.
culturally interresting but professionnally almost useless - Review written on December 04, 2003
Rating: 2 out of 5
2 customers found this review helpful, 14 did not.
I could resume this book by..."don't code in Java, do it directly in C"..it remembers me when I was a young C programmer I read a book on performance in C the shortcut was "Don't code in C do it directly in Assembler".
I really enjoyed this book for my programming general culture but for my professionnal day to day it seemed to me almost useless because I work on large J2EE projects.
If I were building a high accessibility web site hosted on a pentium 100 with 8MB ram I would use these techniques but my clients have money and business requierements so I will just keep this book has a enlighment for my discussions with my programmers buddy.
Excellent book, not just my view - Review written on October 24, 2003
Rating: 5 out of 5
7 customers found this review helpful, 2 did not.
This is an excellent book, with something like 300 tuning techniques covered. Some techniques are more hairy than others, but the breadth and depth is astonishing. I did extensive research before buying this book. I found that it was in the top 3 editors choice for Java book at Javaworld a couple of times, in the top 20 Java books readers choice at JDJ a couple of times (note that is all "Java" books, not "Java Performance" books), it was the choice of a comparative review of Java performance books, it had good reviews by every professional review I could find, and finally, after having read it, it is one of the few Java books I keep handy as a reference.
Looking down at some of the other reviews here at Amazon, I see most people agree with me too. There are some nitpickers. I had to laugh at sudiptokanti, he seems to have decided the book was too dangerous for him. Certainly there are suggestions in the book of hairy performance tunes, as there are many more of perfectly good best practice tunes. And, as the author points out, you should not be using these techniques except after you have identified a bottleneck. sudiptokanti seems to have reviewed the book as if it is a development guide rather than what it is: an excellent guide on performance tuning your applications.
NOT recommended! Full of impractical suggestions - Review written on October 02, 2003
Rating: 2 out of 5
34 customers found this review helpful, 12 did not.
Newbies, please take the author's sugessions with a big pinch of salt, please do not go ahead and rewrite JDK classes as author says, and about 'ensuring that the defragmentation procedure does not disrupt your own use of disk sweet spots' - ask the author how. I must confess some parts of the book (a very small part though) are informative, and that alone earned the second star in this review, else I would have had no compunction to stick it with a single star.
It would not take more than a casual browse-thru for an experience java developer to call the bluff, I'm concerned that some newish practitionars might end up in deep water following these suggestions.
Firstly, this book comes nowhere near discussing any J2EE performance topics, though nowadays it's difficult to find plain vanilla java implementations. The author did devote a whole chapter on distributed computing, I expected to find discussions on tuning parameters for EJB deployment descriptors there; nope, he decided to discuss server-object implementation of CORBA and RMI instead, he compared them, compared different communication layers and other stuff, in short he explained to you everything about the components you have no control over! This book in most cases concentrates on topics only of academic interest, except for some discussion on code styles I found next to nothing to take away from this book.
Author has given enough number of tables with performance comparisons to fill half the space for the book, but understand that these results are only indicative of what might happen for a particular program on a particular system, I'm not even going to the detail to tell you that in some cases the results and table heading say completely different things (e.g. Table 7.2 Speedups using Exception-driven loop termination actually compares timing across different switch approaches), that reminds me, I have to compile a 'don't do' list to be used along with this book
Do not
- replace JDK classes: it would be unfair to say that the author himself has not warned you against it, but let me also quote him "For optimal performance, I recommend developing with your own versions of classes rather than JDK versions whenever possible." I find it outright funny, I almost can't believe (except for the fact that the rest of the book is in keeping with it) that he is actually suggesting something so ridiculous as this, I wonder whether somebody in Microsoft listened to him before they got into a legal tussle with sun about copyright.
- depend on optimizations with -O
- compile to native machine code (go use C++)
- get hooked on to native method calls: to quote the author "say goodbye to 100% pure java certification, and say hello to added complexity..." so it's not that the author has no idea of what he was talking about... still those siggestions? makes the book thicker ;-)
- reuse Exception objects
- get hooked onto the concept of comparison by identity, in short do not make significant modifications to your codes to get a comparison by identity, do not define a 'public static final Integer ZERO = new Integer(0)'
- use WeakReferences
- converts Strings to char arrays
- write exception-terminated loops
- and a lot of other things
I gather I have made my point, do not buy this book unless you want to write blazingly fast applications those do not work right and is a nightmare to maintain.
Performace tuning, now we're talking - Review written on July 11, 2003
Rating: 5 out of 5
1 customer found this review helpful, 1 did not.
This edition provides substantial benchmarks which thorough includes coverage of the JDK including loops, exceptions, strings, threading, and even underlying JVM improvements in the 1.4 VM. This book is one of a kind in its material and completeness.
In my opinion, the author doesn't spend as much time on J2EE as is spent on J2SE chapters. I was excited to all of the stats and examples on J2SE, but was let down when there was nowhere near as much emphasis on J2EE. Many of the J2SE performance practices still apply for J2EE, but it would be useful to strengthen these chapters with actual performance metrics.
This book is indispensable for the developer that is designing the performance requirements and the processes for proper testing. In addition to containing excellent advice, it's the most up to date publication dealing specifically with performance of Java applications.
Offering plenty of examples and sample code - Review written on May 15, 2003
Rating: 5 out of 5
1 customer found this review helpful.
Now in an updated second edition that covers Java SDK 1.4 and J2EE performance tuning, Java Performance Tuning: Efficient & Effective Tuning Strategies by Java programming expert Jack Shirazi is a solid and superbly presented instructional resource and reference for advanced computer programmers wanting to improving their Java program performances, ranging from optimizing input/output routines, to speeding up servlets, to making the most of profiling tools, to searching out program bottlenecks, to applying appropriate sorting and other algorithms, and much, much more. A solid and comprehensive guide offering plenty of examples and sample code in addition to the well-reasoned text, Java Performance Tuning is an ideal and strongly recommended addition to any Java user's reference personal or professional reference collection.
Indispenable! - Review written on March 31, 2003
Rating: 4 out of 5
5 customers found this review helpful.
Performance has been the albatross around Java's neck for a long time. It's a popular subject when developers get together "Don't use Vector, use ArrayList, it's more efficient." "Don't concatenate Strings, use a StringBuffer, it's more efficient." It's a chance for the experienced developers to sit around the design campfire and tell ghost stories of previous projects where they implemented their own basic data structures {String, Linked List...} that was anywhere from 10-50% faster than the JDK implementation (and in the grand oral tradition of tall tales, it gets a little more efficient every time they tell it). Every developer has written a microbenchmark (a bit of code that does something 100-1000 times in a tight loop and measure the time it takes for the supposed "expensive operation") to try and prove an argument about which way is "more efficient" based on the execution time. The problem is when running in a dynamic, managed environment like the 1.4.x JVM, there more factors that you don't control than you do, and it can be dificult to say whether one piece of code will be "more efficient" than another without testing with actual usage patterns. This book provides substantial benchmarks (not just simple microbenchmaks) with thorough coverage of the JDK including loops, exceptions, strings, threading, and even underlying JVM improvements in the 1.4 VM. This book is one of a kind in its scope and completeness.
Fun and informative - Review written on March 16, 2003
Rating: 5 out of 5
3 customers found this review helpful, 1 did not.
Once the business rules have been settled and all that is left is to tune the code, then the fun starts. Like a race car mechanic trying to squeeze out a couple of extra MPH from a race car, the most fun in programming is to try squeeze out extra performance from some code. A book on performance tuning should understand that and make the topic fun. Reading this book it is clear that Jack Shirazi loves to tune code. He has done an incredible amount of detailed research on different JVMs to determine exactly how to make Java perform. But he is also practical. He explains how to find performance problems, which exact areas to concentrate on, and which areas to ignore. After reading this book you won't waste your time on areas of code that can't be easily optimized and instead you'll know how to concentrate on those places where you can get the most bang. The book has been updated from the earlier edition to bring all the information up to date with the latest JVMs. Best of all, an additional 250 pages has been added to the book covering J2EE including Servlets, JSPs, EJBs, and JDBC. "Java Performance Tuning" is a programmer's book. You are guaranteed to learn a lot of very neat and useful tricks. I doubt that there is another Java book on the market with as many "WOW!" moments in it. Buy it and watch your code zoom.
performance checklist - Review written on March 15, 2003
Rating: 4 out of 5
9 customers found this review helpful, 1 did not.
"Java Performance Tuning" by Jack Shirazi has written a fairly comprehensive account on Java performance problems. The book is geared towards a programmer with medium level of experience with Java technology, it requires familiarity with basic Java techniques and with basic understanding of JVM design. For experienced programmer, most of the material mentioned will be familiar, just by virtue of programming in Java for a few years one will encounter most of the problems outlined.
Mr. Shirazi starts with outlining the profiling strategies and basic available tools. From that he proceeds towards topics in object creation, GC, string manipulation, exceptions, loops , I/O, threading models, caching strategies, distributed computing, and some very brief mention of the underlying OS issues. Most of the material states the problem (which is almost always the most important part), tells you how to identify it, and sketches a few solutions. It is not a programming recipe book by any stretch of imagination. Hope is that as one will read the book, he/she will think about performance up front and will become a better programmer as the result.
Arguably, what the book fails to explain is JVM and Java internals, which will provide an insight on why things happen the way they happen. I would appreciate more coverage on available performance benchmarks (which are only briefly mentioned), and/or on how to write a good performance testing case for each of the optimizations outlined.
Awesome ! Written by the hard-core hacker and researcher - Review written on September 05, 2002
Rating: 5 out of 5
5 customers found this review helpful.
I'm still reading the book but I can already see that this title is one of the best in "Java Performance"
area. I can go even further - this title seems to be one of the best Java books I've ever read.
The author is a serious Java developer (geek, hacker, whatever you call it) who's going nuts
to achieve a better performance for his applications (he even keeps his loops going from
N to 0 - it's a bit faster than going from 0 to N). While most other people may advise you
to use a profiler (and Jack is doing this too, of course) he's actually implementing a couple
of mini-profilers by himself. The depth he covers the material is probably the deepest you can
meet today - unfortunately, not so many authors are even trying to cover all necessary details,
but if Jack is going to talk about something - you're going to hear almost everything you'll
ever need (if "Java Platform Performance: Strategies and Tactics" authors are only mentioning
optimizing compilers - Jack is explaining what are they, what are they doing, how are they doing
it, what are consequences to what they're doing .. you get me).
Personally, I wouldn't agree with everything he offers (and I'll never replace any String class,
Jack!), but this books is still a highly valuable source of optimization and performance tuning
information. I can't recommend it more.
Jack is also maintaining a Web-site (javaperformancetuning.com) full of excellent information and
articles reviews. Frankly, if it's not in his book or Web-site - I believe it simply doesn't
exist. Boy, he's so good.
Please, excuse me for a personal bias in this review - I couldn't keep myself from
applauding to Jack. Excellent work, man.
P.S.
A special "thank you" goes to using checklists at the end of every chapter and on the site - I'm
a big fan of checklists and never understood authors ignoring such a simple but
powerful technique.
Best Tuning Book I've Seen - Review written on May 11, 2002
Rating: 5 out of 5
3 customers found this review helpful, 1 did not.
Not only does Jack Shirazi provide an array of useful benchmarks in "Java Performance Tuning", both at the micro and macro level, he provides excellent case studies on how to set up and run benchmarks. Results are given for JDK versions 1.1.6, 1.2, and 1.3 with and without HotSpot. Although it would be nice to get a more up to date test including 1.4 and other run times, the utility of this book goes far beyond what it reports about the compilers and run times available in late 2000.
The high level advice on a tuning methodology (profile and target, of course) is sound, as is the emphasis on perceived performance. Topics everyone should be aware of from caching to threading to streaming are dealt with up front. This might make this book rather hard to follow for readers unfamiliar with these concepts. Further advice on how to measure (try to get close to reality) and to not tune what you don't need to tune are also sound pieces of advice that are often overlooked.
Admirable attention to garbage collection and command-line tuning of the run-times and compilers increased my confidence in the results, and should serve as a model to other benchmarkers. Details considered include everything from cache size and disk framentation to network bottlenecks.
There are too many useful sections to list here. The writing is crisp and clear, the pace fast, and the examples well chosen. Shirazi provides depth on topics ranging from low level constructs such as switch statements, method calls, or upcasts, through intermediate constructs such as threading and object creation and reuse, to higher-level constructs such as the String and Collection classes. In chapter 8, the section "From Raw I/O to Smokin' I/O" alone justifies having this book on your shelf.
This book is about tuning. It is not a book about algorithms or algorithm analysis. You'll need to know that, too. An elegant bridge between tuning and algorithms can be found in Jon Bentley's "Programming Pearls".
All told, "Java Performance Tuning" is the best book on tuning I've ever read. Don't even bother with Wilson et al.'s "Java Platform Performance".
Excellent coverage of a complex topic - Review written on December 19, 2001
Rating: 4 out of 5
9 customers found this review helpful, 1 did not.
You have been working on that Java application for two weeks and it's finally ready for testing. Your window for having the web site down is ten minutes but you aren't concerned. Three hours later with the program still running, you are more than concerned. Before you panic, pick up a copy of "Java Performance Tuning". This book is geared for serious developers who need to dramatically improve performance in their applications and are willing to dig deep into the code. For example, writing your own customized Reader and byte-to-char converter can be ten times faster than using the BufferedReader class. Shirazi starts off by showing how to measure performance and identify bottlenecks, including a way to override the Object class to measure object creation. Subsequent chapters discuss key performance issues and possible solutions. Topics covered include replacing Strings with char arrays, eliminating casting and minimizing object creation, removing method calls from inside of loops, writing your own sort routines instead of using Arrays.sort(), identifying the correct Collection object, using threading to improve performance, and optimizing distributed systems to decrease network communication. As Shirazi explains, some of the methods covered may violate encapsulation or other OO techniques so they should only be used when performance has been identified as a critical problem. Besides being well written, the book is fun. I found myself trying to figure out along with the author how to improve the performance of the various examples demonstrated in the book.
One of the most useful Java books I own - Review written on August 30, 2001
Rating: 5 out of 5
10 customers found this review helpful.
This book analyzes what it is that makes many Java programs slow and what can be done to speed them up. Many of the examples exhibit speed increases of 20x-100x! Mr. Shirazi doesn't just talk about optimizing your switch statements so they use the table-lookup version of the bytecode (although that is covered), which is one of the low-level optimizations that will sometimes double the speed of a critical section, but also shows how to implement more profound algorithmic optimizations - the kind that can give order-of-magnitude speedups or better.
Memory management is covered, including excellent coverage of object creation, what the overhead REALLY is, how to reduce it by reusing objects, avoiding primitive wrapper classes, and other optimizations.
There is also suberb advice on algorithms (sorting, searching, data structures), I/O, multithreading (LOTS of fun, as always), character encoding optimization, and the fascinating but complex world of distributed computing.
A good distinction is made between the kinds of optimizations that are simply good coding practices and should be practiced regularly (such as using StringBuffers instead of Strings with the + operator) and those that, while being good for performance, are bad for design and increase maintenance costs. So Mr. Shirazi shows us that we can never know what will be slow until we profile, profile, profile. And the profiling done throughout the book doesn't use expensive commercial products, but simple timing code discussed in the first couple chapters.
Overall, a book I very much enjoyed reading and I highly recommend it.
Must Read Professional Java Programmers - Review written on July 03, 2001
Rating: 5 out of 5
4 customers found this review helpful.
The book covered each area of Java performance except GUI/drawing. The performance techniques covered are many - I counted more than 200 listed in the index. The writer also gave a very good guide to the procedure for tuning applications, so I could start immediately without having to think "what to do next?"
The checklists are very useful. I wanted to have a separate copy of all the checklists so that I could tick them off as I worked. I ended up photocopying them and keeping them a separate resource. I have many Java books, and this is one of the few books which I now keep ready to refer to. Excellent book.
Recommended for developers... - Review written on February 22, 2001
Rating: 5 out of 5
17 customers found this review helpful, 2 did not.
This book is diverse in it's approach to java performance tuning. It is very good at describing common bottlenecks in detail and providing concrete examples of how to write better performing code.
It has good coverage of topics including Object creation, I/O and sorting. It illustrates efficient ways to write loops and switches and provides insight into the performance costs of exceptions and casts. 'Java Performance Tuning' also shows how to implement class specific collection classes among other topics.
It takes a comprehensive look at the java profiling tools available and gives illustrated advantages of applying specific techniques. Performance results are contrasted for the various JVMs (JDK1.2 with and without JIT, JDK1.3, Hotspot 1.0).
'Java Performance Tuning' has improved my programming and will sit on my shelf as an excellent reference I know I can turn to if asked to tune a Java application.
Criticisms invalid - Review written on January 16, 2001
Rating: 5 out of 5
16 customers found this review helpful, 1 did not.
I fail to understand the prior critical messages. One said that the author didn't present an accurate description of Reference objects. Well, the description starting on page 108 matches the one I was given by Sun in their performance workshop I attended in Mountain View. So I guess Sun does not know what they are doing in terms of Reference objects :).
Another message claimed that this book was not useful for enterprise applications. To the contrary, I was very impressed with the way he covered the actual process of doing performance analysis, he didn't just present a bunch of individual tips. Many people neglect this in enterprise development - they spend a bunch of time eyeballing the code and trying to do some quick fixes when they really need to set up a harness and do some serious testing.
Excellent book - Review written on January 01, 2001
Rating: 5 out of 5
1 customer found this review helpful, 7 did not.
This is an excellent book by an experienced programer.
The criticisms of it are totally unjustified.