Saltar al contenido ForoHackers

Performance engineering: start here

Ingeniería de rendimiento
#3391 · · Citar · Denunciar

Performance engineering is the practice of making software use less time, memory, energy or bandwidth, guided by measurement rather than guesses. Most programs spend nearly all their time in a small part of the code, so the skill is finding that part, understanding why it is slow and changing the right thing.

Key concepts

  • Measure first: profile before changing anything; intuition about bottlenecks is often wrong.
  • Algorithms and data structures: a better complexity class beats any amount of tuning.
  • Memory hierarchy: caches mean access patterns matter; contiguous, predictable data is fast.
  • Concurrency and parallelism: using several cores helps only when work divides and contention is low.
  • Latency and throughput: how long one request takes, versus how many are done per second.

Vocabulary

  • Profiler: a tool that shows where a program spends time or memory.
  • Hot path: the code run most often or longest.
  • Cache miss: an access that has to go to slower memory.
  • Amdahl's law: the limit that the serial part of a task puts on speed-up from parallelism.

What to study, in order

  1. Complexity analysis and how to read a profile and a flame graph.
  2. Profile a slow program of your own, find its top cost, fix it and re-measure.
  3. Rewrite a loop for cache-friendly access and measure the difference.
  4. Learn the system's counters and tracing tools to see CPU, memory, disk and network use.
  5. Parallelise a task, then find where contention or waiting limits the gain.

Related tags

#performance-evaluation #algorithms #computer-architecture #web-performance #observability

No has iniciado sesión, así que esto se publica como anónimo: no se guarda con ello ninguna cuenta, nombre ni dirección, y no puede llevar enlaces ni imágenes. Inicia sesión o únete para publicar con tu nombre. Los registros de nuestro servidor web guardan la dirección y la hora de cada petición hasta 14 días; para que la tuya no quede en ellos, usa Tor. Para escribir al equipo de forma confidencial, usa el buzón. Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder