Preprint
Article

Comparative Analysis of C++ and Python in Terms of Memory and Time

Altmetrics

Downloads

6790

Views

4065

Comments

0

This version is not peer-reviewed

Submitted:

19 December 2020

Posted:

21 December 2020

You are already at the latest version

Alerts
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.
Keywords: 
Subject: Computer Science and Mathematics  -   Algebra and Number Theory
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2024 MDPI (Basel, Switzerland) unless otherwise stated