liveBook · Manning

Performance

As explained in The Coder Cafe

A metric is a quantifiable measure used to characterize or evaluate a system, process, or outcome.

Performance describes how efficiently a system completes work. It can be estimated with time complexity, but real-world results also depend on hardware and workload; benchmarking reveals what an application actually does. section 1.1 section 8.2.4

Theoretical costs and practical performance can differ:

  • Linked lists can offer constant-time insertion when the insertion point is known, yet iteration may be slower than in arrays because scattered nodes cause more cache misses. section 1.1 section 1.1
  • Simultaneous multithreading (SMT) may improve throughput, but gains are not linear and can come with higher power use; some memory-bound workloads may perform worse. section 8.2.4 section 8.2.4

Estimate, then measure

For an i7-7700K workload, an idealized eight-thread estimate is 520% efficiency, not 800%. Intel cites up to 30% gain from two threads on one core, alongside a 20% increase in power consumption. Benchmark the actual application rather than assuming these gains. section 8.2.4 section 8.2.4

How The Coder Cafe covers it

How deep it goes
Contrasts operation complexity with cache effects and SMT tradeoffs, then recommends benchmarking instead of relying on theoretical gains.
Examples
Uses array-versus-linked-list iteration and an i7-7700K eight-thread scaling estimate to illustrate practical tradeoffs.
What you can do after
Evaluate performance by benchmarking an application and weighing workload-specific gains against costs such as power use.
How it connects
Connects performance with time complexity, arrays, linked lists, cache locality, simultaneous multithreading, and workload type.

Also explained in

Compare how 55 books explain performance →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Coder Cafe. The section links point to the parts of the book it draws on.