The previous post introduced essential approaches to creating threads and processes in Python. In this post, a more detailed focus on interfaces to concurrent and parallel programming in Python will be described, specifically working with a pool of threads or processes via the
In this post, different approaches to concurrent and parallel programming in Python will be presented on concise code snippets. We will use three standard Python modules, namely
concurrent.futures. This post will not cover the
subprocess module and the new
In the previous post, a Python implementation of a symmetric matrix was described. This implementation saves approximately 50% of memory space. However, when compared with a matrix created via the
numpy module, the average access time for our implementation was much worse than the average access time for the
numpy matrix. In this post, we will speed up the access time by using Cython.
In computer science, symmetric matrices can be utilized to store distances between objects or represent as adjacency matrices for undirected graphs. The main advantage of using a symmetric matrix in comparison with a classic matrix lies in smaller memory requirements. In this post, a Python implementation of such a matrix is described.