Performance Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is benchmarking?

A

Comparing the performance of two or more programs that do the same thing. (Either different versions of a program or two entirely different programs).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is microbenchmarking?

A

Measuring the performance of something small (e.g. a single function, loop, etc).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why is microbenchmarking volatile?

A

Because there are so many outside factors that can skew such benchmarks. Compiler optimizations, CPU operations, etc can throw off the benchmark.

Whole program profiling is considered preferable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is stress testing?

A

Subjecting software to workloads outside the scope of normal operation to test robustness.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between wall time and CPU time?

A

Wall Time: The total amount of real time elapsed.

CPU Time: The amount of time the CPU spent on the task in question.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Profile-Guided Optimization (PGO)?

A

An optimization technique that uses runtime profiling data to guide a second optimization of a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What do the words “hot” and “cold” mean in profiling?

A

They are use adjectivally to describe areas of the code that are executed many times (hot) or not very often (cold).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the program perf?

A

A general purpose profiler that runs on Linux.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Name 2 frontends for perf.

A

Hotspot and Firefox Profiler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the program AMD uprof?

A

A general purpose profiler that runs on Windows and Linux.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 2 best candidates for function inlining?

A
  1. Very small functions.

2. Functions with a single call site.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How could you handle inlining when you have a large function w/ 1 hot call site and multiple cold call sites.

A

Inline the function, then make a wrapper around the function to use at the cold call sites so as to reduce code bloat.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly