Basic Information

  • READ: Course description, prerequisites, goals, integrity
  • READ: FAQs
  • Read the slides of the first lecture
  • Course number: 263-0007, 8 credits
  • Lectures: M 10:15-12:00, HG F3; Th 9:15-10:00, HG G3; occasional substitute lectures: W 14:15-16:00 HG E5
  • The lectures are not streamed but recorded. Login info is different from nethz and has been sent by email.
  • Instructor: Markus Püschel (CAB H69.3, pueschel at inf)
  • Head TA:
    • Tommaso Pegolotti (TP)
  • TAs:
    • Mikhail Khalilov (MK)
    • Hicham Leghettas (ML)
    • Dionisios Spiliopoulos (DS)
    • Theodoros Theodoridis (TT)
    • Shien Zhu (SZ)
  • Mailing lists:
    • For technical questions: (emails to this address go to the lecturer and all TAs)
    • Forum to find project partner: (emails go to all students who have no partner yet and to Head TA)
  • Office Hours: (The last Office Hour takes place on Tuesday 23rd April.)
    • Mon 12:30-14:00 Theodoros (zoom)
    • Tue 13:30-15:00: Mikhail (zoom)
    • Wed 11:00-12:30: Dionisios (CAB D78)
    • Fri 9:30-11:00: Tommaso (CAB J71.6)

Time Line

This list can be subject to minor changes, which would be announced in a timely manner.

Fr 08.03. Project team and project registered in the project system; start project anytime now
Th 07.03. HW1 due
Th 14.03. HW2 due
Th 28.03. HW3 due
Th 18.04. HW4 due
Wed 24.04. Midterm
week of 29.04. 1st one-on-one project meeting (minimal milestone: base implementation done, tested, performance plot, initial optimization plan, explain how you plan to divide the optimization work)
week of 20.05. 2nd one-on-one project meeting
week of 03.06. Project presentations
Fr 21.06. Project report due


  • 40% research project
  • Topic: Very fast, ideally adaptive implementation and associated performance analysis for a numerical problem
  • Team up in groups of four: register in the project system
  • March 8th: find team, find a problem (tip: look at prior courses)
  • Finding a problem: Two options
  • Once project is fixed: add it in the project system to your team
  • Complete “milestones” during the semester and enter them in the project system
  • Later in semester: One or two 1 hour one-on-one meetings with a project supervisor
  • Give short presentation end of semester
  • Write 8 page standard conference paper (template is provided below)
  • 30% midterm
  • 30% homework
    • Exercises on code analysis
    • Implementation exercises
      • study the effect of program optimizations, compilers, special instructions, etc.
      • write and submit C code & create runtime/performance plots
    • All homeworks are single-student homeworks (read integrity rules)
  • There is no final exam

Research Project

  • All projects have to be registered in our project system. This site contains a rough structure for your project and is also used later for updates.
  • How it works:
    • Weeks without homeworks should be used to work on the project
    • You select a numerical algorithm and create a correct (tested) implementation in C
    • You determine the arithmetic cost, measure the runtime and performance
    • You profile the implementation to find the parts in which most the runtime spent
    • Focusing on these you apply various optimization techniques from this class
    • You repeat the previous steps to create various versions with (hopefully) continuously better runtime
    • You use (exclusively) a repository that we provide to you
    • You analyze and reason about the performance behavior
    • You give a presentation and write a short paper about your work
  • Paper:
    • Maximal 7 pages (hard limit) without references, conference style, template and instructions below
    • Everybody reads this: report.pdf
    • Latex source:
    • Due date: 21.06 (in your git repository)
    • Name: (Team ID) + _report.pdf, e.g. 07_report.pdf
  • Presentation
  • Some tips on profiling tools
  • Rough timeline
    • Start project work: any time, the earlier the better
    • Assignment project advisor: around mid April
    • One-on-one project meetings: end of April and May, see above


Wed, 24.04., 14:15-16:00, HG E5, HG F5 and HG F7.

  • All the material up to then is fair game but the overwhelming part will be what was covered in the homeworks
  • You can study previous exams below
  • No books, notes, laptops, cell phones, or other electronic devices are allowed. A dedicated calculator is allowed (i.e., not the one in your cell phone).
  • Assignment of the rooms is based on the first letters of your last name as registered in the system:
    • Ab-Hi: HG E5
    • Ho-Or: HG F5
    • Oz-Zw: HG F7
  • The intervals are inclusive. For example, Bruno Horgan would go to room HG F5.

Previous exams:


Late policy: No deadline extensions, but you have 3 late days. You can use at most 2 on one homework. For example, submitting 20 minutes or 7 hours late costs one late day.

We will be using Moodle for the homeworks.

It may help to look at the homeworks of previous iterations of this course.

Homework Deadline Solution
Homework 0 as soon as possible  
Homework 1 Th March 7th, 5pm Homework 1
Homework 2 Th March 14th, 5pm Homework 2
Homework 3 Th March 28th, 5pm programming exercise auto-assessed
Homework 4 Th April 18th, 5pm Homework 4

Lectures Plan

Date Content Other Material
19.02 Course motivation, overview, organization  
22.02 Cost analysis and performance  
26.02 Intel Skylake architecture/microarchitecture, operational intensity Intel earlier generations (Skylake, Haswell, etc), Sec. 7, Intel Ice Lake (Tiger Lake), Intel Golden Cove (Alder Lake), Agner Fog’s instruction tables, see also uops
29.02 Instruction level parallelism  
04.03 Compiler limitations, benchmarking  
07.03 SIMD vector instructions, AVX Intel intrinsics guide
11.03 SIMD vector instructions, AVX  
14.03 Compiler vectorization (Lecture cancelled please read this section in the SIMD slides above)
18.03 Locality, caches, blocking MMM  
21.03 Roofline model  
25.03 Linear algebra libraries, BLAS, ATLAS, Fast MMM  
28.03 Fast MMM continued, register renaming, virtual memory Comments on working set for TLB
08.04 Rest virtual memory and linear algebra, Sparse linear algebra, sparse MVM  
15.04 Discrete/fast Fourier transform  
22.04 Fast FFT, FFTW  
29.04 Spiral: DSL-based program generation for performance