Skip to content

Commit 926bdcf

Browse files
authored
Merge pull request #284 from gregordecristoforo/profiling
Add structure of profiling lecture
2 parents 188a462 + ec740d4 commit 926bdcf

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

content/profiling.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Productivity tools and Profiling
2+
3+
## Productivity tools
4+
5+
```{questions}
6+
- Do you have preferences on the visual aspects of the code
7+
and how it should look?
8+
- Do you use any tools that help you create better looking
9+
code faster?
10+
```
11+
12+
```{objectives}
13+
- Learn tools that can help you be more productive.
14+
- Learn how to follow standards that other people have created
15+
and how to pick your own favorite.
16+
```
17+
18+
> [!IMPORTANT]
19+
> Left to do: Summarize [Productivity tools lecture](/content/productivity.rst) in 20 minutes.
20+
21+
22+
## Profiling
23+
24+
```{questions}
25+
- When shall we worry about the performance of our code?
26+
- How do we find bottlenecks in our code?
27+
- How do we measure improvements in running time and memory usage?
28+
```
29+
30+
```{objectives}
31+
- Understand when improving code performance is worth the time and effort.
32+
- Learn how to use profilers in Python.
33+
- Use `scalene` to find and optimize bottlenecks in a given code example.
34+
```
35+
36+
37+
> [!IMPORTANT]
38+
> Left to do:
39+
> Give 20 minutes introduction to profiling:
40+
> - [ ] Discuss when to profile
41+
> - [ ] Discuss breifly manual profiling
42+
> - [ ] Introduce function call profilers
43+
> - [ ] Introduce line profilers
44+
> - [ ] Visualize one code example using `scalane`
45+
46+
## Exercise
47+
> [!IMPORTANT]
48+
> Prepare two exercises for the last 20 minutes of this lecture.
49+
> Left to do:
50+
> - [ ] Provide exercise in pure python, Radovan has some ideas
51+
> - [ ] Provide exercise showing the improvement in performance when introducing numpy and/or pandas, Gregor will work on this
52+
53+

0 commit comments

Comments
 (0)