Version 1
: Received: 19 December 2020 / Approved: 21 December 2020 / Online: 21 December 2020 (11:57:01 CET)
How to cite:
Zehra, F.; Javed, M.; Khan, D.; Pasha, M. Comparative Analysis of C++ and Python in Terms of Memory and Time. Preprints2020, 2020120516. https://doi.org/10.20944/preprints202012.0516.v1
Zehra, F.; Javed, M.; Khan, D.; Pasha, M. Comparative Analysis of C++ and Python in Terms of Memory and Time. Preprints 2020, 2020120516. https://doi.org/10.20944/preprints202012.0516.v1
Zehra, F.; Javed, M.; Khan, D.; Pasha, M. Comparative Analysis of C++ and Python in Terms of Memory and Time. Preprints2020, 2020120516. https://doi.org/10.20944/preprints202012.0516.v1
APA Style
Zehra, F., Javed, M., Khan, D., & Pasha, M. (2020). Comparative Analysis of C++ and Python in Terms of Memory and Time. Preprints. https://doi.org/10.20944/preprints202012.0516.v1
Chicago/Turabian Style
Zehra, F., Darakhshan Khan and Maria Pasha. 2020 "Comparative Analysis of C++ and Python in Terms of Memory and Time" Preprints. https://doi.org/10.20944/preprints202012.0516.v1
Abstract
In this era of technology, programming has become more significant than ever before. Python and C++ are both widely used programming languages. Python, the most popular programming language in today’s world, is a high-level object-oriented language whereas C++, the language behind most operating systems, is a low-level object-oriented language. In this paper, we present a comparative study of Python and C++. This paper discusses the introduction to these languages, their memory management techniques, and the reasons behind their program execution speed. Furthermore, we analyzed the execution time and memory used by multiple algorithms in both the languages with best, average, and worst cases. They are also compared with respect to the benefits and issues related to them. Results indicate that C++ is faster than Python in execution speed but Python serves as a better language for beginners due to its simplicity. Moreover, for the best results, the language should be selected according to the type of project.
Computer Science and Mathematics, Algebra and Number Theory
Copyright:
This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.