-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #284 from gregordecristoforo/profiling
Add structure of profiling lecture
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Productivity tools and Profiling | ||
|
||
## Productivity tools | ||
|
||
```{questions} | ||
- Do you have preferences on the visual aspects of the code | ||
and how it should look? | ||
- Do you use any tools that help you create better looking | ||
code faster? | ||
``` | ||
|
||
```{objectives} | ||
- Learn tools that can help you be more productive. | ||
- Learn how to follow standards that other people have created | ||
and how to pick your own favorite. | ||
``` | ||
|
||
> [!IMPORTANT] | ||
> Left to do: Summarize [Productivity tools lecture](/content/productivity.rst) in 20 minutes. | ||
|
||
## Profiling | ||
|
||
```{questions} | ||
- When shall we worry about the performance of our code? | ||
- How do we find bottlenecks in our code? | ||
- How do we measure improvements in running time and memory usage? | ||
``` | ||
|
||
```{objectives} | ||
- Understand when improving code performance is worth the time and effort. | ||
- Learn how to use profilers in Python. | ||
- Use `scalene` to find and optimize bottlenecks in a given code example. | ||
``` | ||
|
||
|
||
> [!IMPORTANT] | ||
> Left to do: | ||
> Give 20 minutes introduction to profiling: | ||
> - [ ] Discuss when to profile | ||
> - [ ] Discuss breifly manual profiling | ||
> - [ ] Introduce function call profilers | ||
> - [ ] Introduce line profilers | ||
> - [ ] Visualize one code example using `scalane` | ||
## Exercise | ||
> [!IMPORTANT] | ||
> Prepare two exercises for the last 20 minutes of this lecture. | ||
> Left to do: | ||
> - [ ] Provide exercise in pure python, Radovan has some ideas | ||
> - [ ] Provide exercise showing the improvement in performance when introducing numpy and/or pandas, Gregor will work on this | ||
|