Welcome to the site for Scott Meyers' book-in-progress, Fastware!: Straight Talk about Fast Code.
Vision
The executive summary for Fastware! is:
A book of under 300 pages covering the most important practical information about designing and implementing programs and systems that are fast. Aimed at architects, designers, and implementers of software systems targeting any problem domain using any programming language(s). Suitable for students or professionals. Assumes software development experience, but no formal background in Computer Science. Brings together the most important speed-related information every developer should be familiar with.
Unlike Scott's "Effective" books, Fastware! will be language-independent, as applicable to programmers in C#, Java, Python, Ruby, etc., as to C and C++ developers.
Resources
Current Fastware!-related resources include the following:
-
The Fastware Project, Scott's blog devoted to his work on the
book. Includes entries related to authoring as well as those
more concerned with content.
-
A draft version of the book's Introduction. For information
about this draft, consult
the blog's entry about it.
- A list of sources (in the form of an Excel spreadsheet) Scott has found relevant to the material in Fastware!. When the list is updated, Scott announces it at the book's blog.
Topics
Fastware! is expected to include chapters on the following topics:
- Introduction: Why fastware matters; fastware vs.
"performance," "efficiency," "scalability," "responsiveness," etc.
- Memory and Processors: Memory hierarchies, cache
behavior, processor variations, and their implications for software
developers. Specialized hardware, e.g., GPUs, FPGAs, DSPs, etc.
- Collecting Empirical Data: The importance of empirical
data; logging for data mining; development environments vs.
deployment environments, etc.
- Exploiting Constraints: General-purpose solutions vs.
special-purpose solutions; the importance of verifying constraints;
"cheating."
- Avoiding Computation: Precomputation (e.g., indexing,
lookup tables, prefetching, etc.), caching, lazy evaluation,
incremental computation, etc.
- Data Structures and Algorithms: Complexity analysis and
the real world; cache- and concurrency-friendliness; evaluation of
standard facilities in C#, Java, and C++; important algorithms, etc.
- IO: Disk IO vs. network IO; buffering; defragmentation;
compression; striping; minimizing transmission distance; using
deltas; memory mapping, etc.
- Concurrency: Data/task/pipelining parallelism;
synchronization primitives; insulation; alternative approaches
(e.g., lock-free, stream processing); exploiting "extra" cores and
threads.
- Memory Management: For native code (C/C++); for managed
code (Java/.NET); heaps/pools/arenas; working with generational and
compacting collectors, etc.
- Environment Issues: Your code is a minority of what
executes; compilers and options; WPO and PGO; runtimes and options;
getting the most out of third-party libraries and applications, etc.
- Creating Fastware: Treating speed as a correctness
criterion; designing for speed; assuming the existence of HW
concurrency, etc.
Accelerating Slowware: Profilers and other tools; analyzing logs; "disturb and observe" strategies, etc.