Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add structure of profiling lecture #284

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions content/profiling.md
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]

Check warning on line 18 in content/profiling.md

View workflow job for this annotation

GitHub Actions / Build

'myst' cross-reference target not found: '/content/productivity.rst'
> 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


Loading