It is time for our first hands-on exercise. In the subsequent weeks there will be many more of them. In this exercise you can familiarize yourself with cProfile. Start your …
Heat (or diffusion) equation is a partial differential equation that describes how the temperature varies in space over time. The numerical solution of the heat equation contains performance aspects that …
cProfile is powerful performance analysis tool included in the Python standard library. In this video we walk through the main steps when investigating performance of Python programs with cProfile. As …
Measuring very short execution times has some pitfalls that can be avoided with the help of the timeit Python module. Sometimes one might be interested in measuring the performance of …
By inserting timing routines to a program, the time spent in specific parts of the program can be measured. In order to get a bigger picture of the performance of …
Analyze before you optimize. Some performance aspects can be considered already in early phases of software development, but generally one should first focus on making the program correct. In addition …
Python is very flexible and dynamic language, but the flexibility comes with a price. Computer programmes are nowadays practically always written in a high-level human readable programming language and then …
We hope that you have now succeeded in setting up the programming environment and downloading the hands-on exercise material. In this video we outline the topics for the rest of …
Software In order to carry out the hands-on programming exercises, you need a working Python environment that contains a selection of Python packages for scientific and high-performance computing. The following …
In order to succeed in this course, you need to know few things beforehand. First, this course is aimed at people who already know how to program in Python. We …
Python has a rich ecosystem also for parallel computing, both standard library and third party packages provide tools for different parallel programming approaches. In this course we focus on the …
In this exercise we utilize C-functions in the heat equation solver. Continue with the code located under cython/heat-equation. Reduce the function call overheads by defining proper functions as C-functions. Investigate …
In this exercise, we create a Cython extension for the heat equation solver and add static typing. The code for this exercise is located under cython/heat-equation. Creating a Cython extension …
In this exercise we explore how to evaluate expressions efficiently with numexpr. Source code for this exercise is located in numpy/numexpr/ Try different array expressions and investigate how much numexpr …