Comparison of Memory Efficiency and Computation Time of Bubble Sort, Insertion Sort, and Intro Sort Algorithms Using the C++ Programming Language
DOI:
https://doi.org/10.59934/jaiea.v5i2.1858Keywords:
Bubble Sort, Insertion Sort, Intro Sort, Sorting Algorithm, Recursive, Iterative, Time Complexity.Abstract
Data sorting is a fundamental step in the computer process that greatly affects the effectiveness of programs and overall system performance. In this study, three sorting algorithms, namely Bubble Sort, Insertion Sort, and Intro Sort, are analyzed and compared using recursive and iterative approaches. Bubble Sort serves as a basic algorithm example to understand the basic idea of element exchange, while Insertion Sort was chosen for its efficiency on small and nearly sorted datasets. Intro Sort, as a combination algorithm that integrates Quick Sort, Heap Sort, and Insertion Sort, was studied to reveal how its adaptive mechanism can provide more optimal results. The testing was conducted by measuring execution speed, sorting stability, and memory usage efficiency. The findings from this study show that Bubble Sort ranks lowest in terms of performance and is less suitable for large data sets. Insertion Sort shows better results on small data sets and those with similar patterns. Intro Sort emerges as the most effective algorithm with stable processing time, high adaptability, and faster and more efficient sorting results for various data sizes. Overall, this study emphasizes the importance of choosing a sorting algorithm that suits the characteristics of the data and the needs of the application. The combination of adaptive strategies such as those in Intro Sort is the best solution for current data processing, which demands high speed and efficiency.
Downloads
References
S. Zahwa, Nailah Dhina Amelia, Rizqi Nafila, Rosila Agustina Putri, and Imam Prayogo Pujiono, “Perbandingan Efisiensi Memori dan Waktu Komputasi pada Algoritma Rekursif dan Iteratif dalam Operasi Pengurutan di C++,” J. RESTIKOM Ris. Tek. Inform. dan Komput., vol. 7, no. 1, pp. 123–136, 2025, doi: 10.52005/restikom.v7i1.428.
D. W. Suparta, “INF202 : Struktur Data Pengurutan ( Sorting )”.
Y. A. Astuti, “Analisis Pengujian Data Algoritma Bubble Sort,” REMIK Ris. dan E-Jurnal Manaj. Inform. Komput., vol. 7, no. 3, pp. 1413–1420, 2023, [Online]. Available: https://polgan.ac.id/jurnal/index.php/remik/article/view/12594
M. Irfan Ali, Rangga Dzikri Fardiarsyah, Lukman Shodik, Fadilah Zahra Dwi Kinanti, and Imam Prayogo Pujiono, “Analisis Komparatif Efisiensi Memori dan Waktu Komputasi pada 8 Algoritma Sorting menggunakan C++,” LogicLink, vol. 2, no. 1, pp. 1–17, 2025, doi: 10.28918/logiclink.v2i1.10868.
Y. Zheng and K. L. Tan, “Sorting on Byte-Addressable Storage: The Resurgence of Tree Structure,” Proc. VLDB Endow., vol. 17, no. 6, pp. 1487–1500, 2024, doi: 10.14778/3648160.3648185.
O. R. L. Peters, “Pattern-defeating Quicksort,” 2021, [Online]. Available: http://arxiv.org/abs/2106.05123
D. Z. Vierdansyah, G. Al Ghafiqi, M. T. Dwi Putra, and D. Pradeka, “Comparison Analysis Of Bubble Sort And Insertion Sort Algorithm On The Selection Of A Shop According To The Criteria,” J. Comput. Eng. Electron. Inf. Technol., vol. 2, no. 1, pp. 39–52, 2023, doi: 10.17509/coelite.v2i1.57091.
N. Mahrozi and M. Faisal, “Analisis Perbandingan Kecepatan Algoritma Selection Sort Dan Bubble Sort,” J. Ilm. Sain dan Teknol., vol. 1, no. 2, pp. 89–98, 2023.
R. Latifah, E. Arriyanti, and A. R. Hakim, “Perbandingan Efisiensi Kinerja Algoritma Bubble Sort dan Algoritma Selection Sort Pada Parallel Programming,” pp. 1–78, 2021, [Online]. Available: http://repository.untag-smd.ac.id/10/1/04. ABSTRAK RAHMI LATIFAH.pdf
R. P. Aryanto, A. Nilogiri, and A. E. Wardoyo, “Optimasi Pengurutan Data Bilangan dengan Menggabungkan Algoritma Selection Sort Hybrid dan Bucket Sort,” Edumatic J. Pendidik. Inform., vol. 7, no. 1, pp. 39–48, 2023, doi: 10.29408/edumatic.v7i1.12358.
P. Dymora and A. Paszkiewicz, “Performance analysis of selected programming languages in the context of supporting decision-making processes for industry 4.0,” Appl. Sci., vol. 10, no. 23, pp. 1–17, 2020, doi: 10.3390/app10238521.
P. Rysak, “Comparative analysis of C and Python on the basis of the execution time of applications implementing selected algorithms,” vol. 26, no. October 2022, pp. 93–99, 2023.
A. A. Blg and A. M. Alasoud, “a Comparison Analysis Between the C++ and Python Programming Languages,” J. Appl. Sci., vol. 33, no. 1, pp. 20–32, 2020.
A. Yasir and M. Eka, “Analisis Perbandingan Performa Bahasa Pemrograman Populer dalam Pengembangan Aplikasi Desktop,” vol. 1, no. 1, pp. 29–34, 2025, [Online]. Available: https://journals.raskhamedia.or.id/index.php/juiktiDOI:https://doi.org/99.9999/juikti.vxix.xxxx
M. Sengupta, “Reclaiming Performance : The Strategic Role of C ++ in High-Volume Financial Transaction Systems,” vol. 11, no. 4, pp. 8167–8173, 2025, doi: 10.22399/ijcesen.4202.
H. Al Ghifari, “Penggunaan algoritma bubble sort pada Bahasa pemprograman Java,” vol. 3, pp. 681–687, 2025.
N. Sari, W. A. Gunawan, P. K. Sari, I. Zikri, and A. Syahputra, “Analisis Algoritma Bubble Sort Secara Ascending Dan Descending Serta Implementasinya Dengan Menggunakan Bahasa Pemrograman Java,” ADI Bisnis Digit. Interdisiplin J., vol. 3, no. 1, pp. 16–23, 2022, doi: 10.34306/abdi.v3i1.625.
P. D. Setyorini, L. T. Azzahro, R. A. Yuniar, and I. P. Pujiono, “Pengembangan Alat Bantu Pembelajaran Sorting Algorithm Berbasis Visual Console C++,” J. Ris. dan Apl. Mhs. Inform., vol. 6, no. 03, pp. 685–694, 2025, doi: 10.30998/jrami.v6i03.13983.
A. Yusuf and Y. Ramadhani, “Analisis Algoritma Bubble Sort Ascending/Descending dan Implementasinya Menggunakan Bahasa Pemrograman Python,” JISCO J. Inf. Syst. Comput., vol. 2, no. 2, pp. 53–57, 2024, [Online]. Available: https://jurnal.fst.uinjambi.ac.id/index.php/jisco/article/view/102
C. Kerja, “Kelebihan dan Kekurangan Insertion,” no. February, 2024.
B. A. Qowy, A. M. Chalik, F. Hanafi, A. Sundawijaya, and P. Studi, “Januari 2022 hal 60-63 Ilmu Komputer STIMIK ESQ Jakarta,” Jl. Tb. Simatupang Kav, vol. 5, no. 1, pp. 60–64, 2022, [Online]. Available: https://jurnal.ugp.ac.id/index.php/jutei
A. H. Yunial, “Analisa Perbandingan Algoritma Bubble Sort dan Perbandingan Eksponensial,” J. Inform. Univ. Pamulang, vol. 10, no. 1, pp. 7–14, 2025.
K. K. Gupta, M. R. Beg, and J. K. Niranjan, “A Novel Approach to Fast Image Filtering Algorithm of Infrared Images based on Intro Sort Algorithm,” J. Comput. Sci. Issues, vol. 8, no. 6, pp. 235–241, 2011, [Online]. Available: http://www.ijcsi.org/papers/IJCSI-8-6-1-235-241.pdf
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Journal of Artificial Intelligence and Engineering Applications (JAIEA)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.







