diff --git a/content/profiling.md b/content/profiling.md new file mode 100644 index 00000000..2b00ede0 --- /dev/null +++ b/content/profiling.md @@ -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 + +