Performance of Parallelism in Python and C++
In this paper, we evaluate the performance of parallelism in Python and C++. Parallel programming can be achieved in Python through the multiprocessing module and in C++ by means of OpenMP directives. For the performance comparison, we use implementations, in parallel and sequential, of three algori...
Saved in:
Published in | IAENG international journal of computer science Vol. 50; no. 2; p. 579 |
---|---|
Main Authors | , , |
Format | Journal Article |
Language | English |
Published |
Hong Kong
International Association of Engineers
22.05.2023
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | In this paper, we evaluate the performance of parallelism in Python and C++. Parallel programming can be achieved in Python through the multiprocessing module and in C++ by means of OpenMP directives. For the performance comparison, we use implementations, in parallel and sequential, of three algorithms: frequency (count the occurrences) of an integer in an unsorted array, matrix transposition, and matrix addition. Our goals are i) to show the performance of the algorithms in their parallel and sequential implementations, in Python with multiprocessing and in C++ with OpenMP and ii) to show the importance of selecting the programming language and libraries when programming in parallel. Our experiments showed that, in general, C++ outperformed Python. Additional experiments with the naïve matrix multiplication algorithm confirmed this conclusion. |
---|---|
ISSN: | 1819-656X 1819-9224 |