Lecture 3: Program Tuning and Optimization

Background Material

Reading

Topics

Tasks

  • Compute CPE and CPI for vsum.c.
  • Compute CPE for the various versions of combine code in (combine.c, combine.h).

    Lecture Notes

    Programs

    1. counter.c - access to cycle counter
    2. counter.h
    3. vsum.c - cycle counting example
    4. Pointers and aliasing (see twiddle.c)
    5. Functions and side-effects (see f.c)
    6. Vector example and optimizations (see vec.c, vec.h)
    7. Versions of combine (sequence of optimizations) (see combine.c, combine.h)

    Resources

    Created: Oct. 7, 2008 by jjohnson AT cs DOT drexel DOT edu