Comparison of C++ and Python performance based on selected algorithms
Article Sidebar
Issue Vol. 40 (2026)
-
Analysis of the capabilities of predictive artificial intelligence models in corporate risk management
Kacper Ziemski188-192
-
Usability and availability of selected e-commerce services
Marcin Kozicki, Maria Skublewska-Paszkowska193-200
-
Comparison of C++ and Python performance based on selected algorithms
Szymon Bogucki, Kacper Burda201-205
-
Security analysis of selected web applications using vulnerability scanners
Mariusz Choroś, Marta Dziuba-Kozieł206-212
-
Comparison of Java and .NET reflection mechanisms for dynamic module loading: a performance benchmark study
Michał Mazur, Sebastian Maruszak, Marek Miłosz213-217
-
Comparative analysis of network vulnerability detection tools
Mateusz Zdunek218-225
-
Evaluation of mobile applications for personal finance management using the MARS scale
Łukasz Nikiel, Artsiom Patskevich, Marek Miłosz226-231
-
Comparison of the effectiveness of roulette betting strategies using Monte Carlo simulation
Marek Sarnecki232-238
-
Analysis of optimization capabilities of selected database management systems
Paweł Tarkiewicz, Małgorzata Plechawska-Wójcik239-246
-
Comparative analysis of Espresso and Appium frameworks for automated UI testing of Android mobile applications
Jakub Derkacz247-254
-
Comparative analysis of the applicability of artificial intelligence models for code generation
Patryk Warchoł, Małgorzata Plechawska-Wójcik255-262
-
Comparison of the effectiveness of selected tools for detecting texts generated by artificial intelligence
Marcin Brodacki, Małgorzata Plechawska-Wójcik263-269
-
Comparative analysis of selected containerization tools in terms of MCP
Paweł Jan Tłusty, Maciej Pańczyk270-276
-
SpikeCliff effect: empirical analysis of deterministic timing discontinuities in sponge-based XOF functions
Łukasz Wójcik, Stanisław Lota277-282
-
Comparison of AI agents for creating SQL queries
Julia Sierpień, Maria Skublewska-Paszkowska283-288
-
Comparative analysis of the performance of PostgreSQL and Neo4j databases in the context of genealogical queries
Michał Muzyka, Mateusz Niedźwiedź, Marek Miłosz289-296
-
Evaluation of the effectiveness of static and dynamic methods in malware analysis
Dominik Tracz, Daniel Sawicki, Konrad Gromaszek297-303
-
Comparison of classical machine learning methods in the task of obesity level classification
Paweł Biesaga, Paweł Powroźnik304-312
Main Article Content
Authors
Abstract
This article presents a comparative performance analysis of selected algorithms implemented in C++ and Python. The experiments were conducted in a controlled virtual environment (Ubuntu Linux running on Oracle VirtualBox with a single CPU core and 6 GB of RAM). The study covered selected sorting algorithms (Merge Sort, Quick Sort, Heap Sort), searching algorithms (Linear Search and Binary Search), and statistical measures. Tests were performed on datasets ranging from 10 to 1,000,000 elements. Performance evaluation included execution time, CPU utilization, and memory consumption. The results demonstrate a significant performance advantage of C++ in execution time and memory efficiency, particularly for large datasets, while both languages exhibit consistent scalability trends corresponding to their theoretical computational complexity.
Keywords:
Sustainable Development Goal (SDG)
- Partnerships for the goals
References
[1] T. H. Cormen, C. E. Leiserson, R. L. Rivest, C. Stein, Introduction to Algorithms, MIT Press, Cambridge, 2009.
[2] R. Sedgewick, K. Wayne, Algorithms, Addison-Wesley, Boston, 2011.
[3] ISO/IEC, Programming Languages — C++ (ISO/IEC 14882), International Organization for Standardization, 2020.
[4] B. Stroustrup, The C++ Programming Language, Addi-son-Wesley, Boston, 2013.
[5] S. Meyers, Effective Modern C++, O’Reilly Media, Sebastopol, 2014.
[6] Python Software Foundation, Python Documentation, https://docs.python.org/3/, [20.02.2026].
[7] M. Lutz, Learning Python, O’Reilly Media, Sebastopol, 2013.
[8] L. Ramalho, Fluent Python, O’Reilly Media, Sebasto-pol, 2015.
[9] F. Dzikowski, Comparison of the performance of script-ing and compiled languages: Python and C, Journal of Computer Sciences Institute 12 (2019) 1–10, https://doi.org/10.35784/jcsi.178.
[10] P. Rysak, Comparative analysis of code execution time by C and Python based on selected algorithms, Journal of Computer Sciences Institute 26 (2023) 93–99, https://doi.org/10.35784/jcsi.3109.
[11] P. Wlazło, J. Smołka, C++ and Java performance on the Android platform, Journal of Computer Sciences Insti-tute 23 (2022) 135–139, https://doi.org/10.35784/jcsi.2912.
[12] L. Prechelt, An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl, IEEE Computer 33(6) (2000) 23–29.
[13] S. Nanz, C. A. Furia, A comparative study of pro-gramming languages in Rosetta Code, In 37th IEEE/ACM International Conference on Software En-gineering (ICSE) (2015) 778–788, https://doi.org/10.1109/ICSE.2015.90.
[14] A. Georges, D. Buytaert, L. Eeckhout, Statistically rigorous Java performance evaluation, Proceedings of the 22nd Annual ACM SIGPLAN Conference on Ob-ject-Oriented Programming Systems, Languages and Applications (OOPSLA) (2007) 57–76, https://doi.org/10.1145/1297027.1297033.
[15] R. Jain, The Art of Computer Systems Performance Analysis, Wiley, New York, 1991.
[16] B. Gregg, Systems Performance: Enterprise and the Cloud, Addison-Wesley, Boston, 2020.
[17] S. Tylec, K. Woś, Swift performance in statistical applications, Journal of Computer Sciences Institute 25 (2022) 409–416, https://doi.org/10.35784/jcsi.3067.
[18] R. Pereira, M. Couto, F. Ribeiro, R. Rua, J. Cunha, J. P. Fernandes, J. Saraiva, Energy efficiency across pro-gramming languages: How do energy, time, and memory relate?, Proceedings of the 10th ACM SIG-PLAN International Symposium on Software Language Engineering (SLE) (2017) 256–267, https://doi.org/10.1145/3136014.3136031.
Article Details
Abstract views: 4

