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...

Full description

Saved in:
Bibliographic Details
Published inIAENG international journal of computer science Vol. 50; no. 2; p. 579
Main Authors Arboleda, Francisco Javier Moreno, Arias, Mateo Rincón, Riveros, Jesús Antonio Hernández
Format Journal Article
LanguageEnglish
Published Hong Kong International Association of Engineers 22.05.2023
Subjects
Online AccessGet full text

Cover

Loading…
More Information
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