E-book
Author Shirazi, Jack

Title Java performance tuning / Jack Shirazi
Edition 1st ed
Published Cambridge, Mass. : O'Reilly, ©2000

Copies

Description 1 online resource (xiv, 426 pages) : illustrations
Series Java series
Java series (O'Reilly & Associates)
Contents Why Is It Slow? -- 2 -- . Tuning Game -- 3 -- . System Limitations and What to Tune -- 3 -- . A Tuning Strategy -- 5 -- . Perceived Performance -- 6 -- . Starting to Tune -- 10 -- . What to Measure -- 15 -- . Don't Tune What You Don't Need to Tune -- 17 -- 2. Profiling Tools -- 20 -- . Measurements and Timings -- 21 -- . Garbage Collection -- 23 -- . Method Calls -- 26 -- . Object-Creation Profiling -- 43 -- . Monitoring Gross Memory Usage -- 50 -- . Client/Server Communications -- 56 -- 3. Underlying JDK Improvements -- 64 -- . Garbage Collection -- 64 -- . Replacing JDK Classes -- 66 -- . Faster VMs -- 68 -- . Better Optimizing Compilers -- 73 -- . Sun's Compiler and Runtime Optimizations -- 82 -- . Compile to Native Machine Code -- 89 -- . Native Method Calls -- 90 -- . Uncompressed ZIP/JAR Files -- 91 -- 4. Object Creation -- 94 -- . Object-Creation Statistics -- 96 -- . Object Reuse -- 97 -- . Avoiding Garbage Collection -- 112 -- . Initialization -- 115 -- . Early and Late Initialization
117 -- 5. Strings -- 122 -- . Performance Effects of Strings -- 122 -- . Compile-Time Versus Runtime Resolution of Strings -- 125 -- . Conversions to Strings -- 126 -- . Strings Versus char Arrays -- 142 -- . String Comparisons and Searches -- 150 -- . Sorting Internationalized Strings -- 153 -- 6. Exceptions, Casts, and Variables -- 161 -- . Exceptions -- 161 -- . Casts -- 167 -- . Variables -- 169 -- . Method Parameters -- 172 -- 7. Loops and Switches -- 174 -- . Java.io. Reader Converter -- 178 -- . Exception-Terminated Loops -- 184 -- . Switches -- 189 -- . Recursion -- 195 -- . Recursion and Stacks -- 200 -- 8. I/O, Logging, and Console Output -- 204 -- . Replacing System.out -- 206 -- . Logging -- 208 -- . From Raw I/O to Smokin' I/O -- 209 -- . Serialization -- 217 -- . Clustering Objects and Counting I/O Operations -- 230 -- . Compression -- 232 -- 9. Sorting -- 237 -- . Avoiding Unnecessary Sorting Overhead -- 237 -- . An Efficient Sorting Framework -- 241
Better Than O(nlogn) Sorting -- 249 -- . Performance Checklist -- 255 -- 10. Threading -- 256 -- . User-Interface Thread and Other Threads -- 258 -- . Race Conditions -- 259 -- . Deadlocks -- 261 -- . Synchronization Overheads -- 265 -- . Timing Multithreaded Tests -- 275 -- . Atomic Access and Assignment -- 276 -- . Thread Pools -- 278 -- . Load Balancing -- 279 -- . Threaded Problem-Solving Strategies -- 291 -- 11. Appropriate Data Structures and Algorithms -- 293 -- . Collections -- 294 -- . Java 2 Collections -- 296 -- . Hashtables and HashMaps -- 298 -- . Cached Access -- 302 -- . Caching Example I -- 303 -- . Caching Example II -- 306 -- . Finding the Index for Partially Matched Strings -- 310 -- . Search Trees -- 314 -- 12. Distributed Computing -- 335 -- . Tools -- 337 -- . Message Reduction -- 339 -- . Comparing Communication Layers -- 342 -- . Caching -- 344 -- . Batching I -- 346 -- . Application Partitioning -- 347 -- . Batching II -- 348 -- . Low-Level Communication Optimizations
349 -- . Distributed Garbage Collection -- 354 -- . Databases -- 355 -- 13. When to Optimize -- 357 -- . When Not to Optimize -- 358 -- . Tuning Class Libraries and Beans -- 359 -- . Analysis -- 362 -- . Design and Architecture -- 366 -- . Tuning After Deployment -- 382 -- . More Factors That Affect Performance -- 383 -- 14. Underlying Operating System and Network Improvements -- 389 -- . Hard Disks -- 390 -- . CPU -- 395 -- . RAM -- 397 -- . Network I/O -- 398
Summary No matter what language they're programming in, developers always wish things would run faster! Especially when writing mission-critical applications, no one wants to be limited by the programming environment. Java Performance Tuning provides all the details you need to know to "performance tune" any type of Java program and make Java code run significantly faster. Java Performance Tuning contains step-by-step instructions on all aspects of the performance tuning process, right from such early considerations as setting goals, measuring performance, and choosing a compiler. Extensive examples for tuning many parts of an application are described in detail, and any pitfalls are identified. The book also provides performance tuning checklists that enable developers to make their tuning as comprehensive as possible. Java Performance Tuning is a book to help you "roll up your sleeves" and examine your code in detail in order to apply different tuning techniques to produce the best possible result. The book shows you how to: Create and plan a tuning strategy Avoid performance penalties from inefficient code Minimize the number of objects a program creates Improve the behavior of loops and switches Use threads effectively
Analysis Certification
Bibliography Includes bibliographical references (pages 405-408) and index
Notes Master and use copy. Digital master created according to Benchmark for Faithful Digital Reproductions of Monographs and Serials, Version 1. Digital Library Federation, December 2002. http://purl.oclc.org/DLF/benchrepro0212 MiAaHDL
English
Copyright © O'Reilly Media, Inc. 2000
Print version record
digitized 2010 HathiTrust Digital Library committed to preserve pda MiAaHDL
Subject Java (Computer program language)
Java (Computer program language)
Java (programmeertaal)
Engineering & Applied Sciences.
Computer Science.
Genre/Form Electronic book
Form Electronic book
LC no. 00062362
ISBN 0596152345
9780596152345