Comparative Analysis of Memory Performance and Processing Time of Five Sorting Algorithms Using C++ Programming Language
DOI:
https://doi.org/10.59934/jaiea.v4i3.1051Keywords:
Sorting Algorithm; Computation Time; Memory usage, CAbstract
This study aims to analyze and compare the performance of five different data sorting algorithms, namely Shell Sort, Heap Sort, Counting Sort, Merge Sort, and Quick Sort, which are implemented using the C++ programming language. The main problem behind this research is the need for algorithms that can sequence data efficiently, both in terms of computing time and memory usage, especially when handling large datasets. The research method was carried out by testing each algorithm on three categories of datasets, namely small (100 data), medium (1,000 data), and large (10,000 data), which contained random numbers with a value range of 1–100. The test is carried out by recording the execution time and memory used during sequencing. The results show that Quick Sort is the algorithm with the fastest execution time on small and medium datasets, while Shell Sort is superior for large datasets. Meanwhile, Merge Sort tends to have the slowest runtime and highest memory consumption across all data categories. Implementing the right algorithm at the scale of the dataset has proven to be important to improve the system's efficiency in data processing. Therefore, the selection of appropriate sequencing algorithms can be a strategic solution in the development of optimal data-based systems.
Downloads
References
M. F. Nanang Mahrozi, “Analisis Perbandingan Kecepatan Algoritma Selection Sort Dan Bubble Sort,” Jurnal Ilmiah Sain dan Teknologi, vol. 1, pp. 89–98, 2023.
S. Aisyah, Memahami Konsep Dasar Algoritma Pemrograman Dengan Menggunakan Metode Pseuducode. 2022. doi: 10.31219/osf.io/n269k.
Halimatussya’diyah Purba and Yahfizham, “Konsep Dasar Pemahaman Algoritma Pemrograman,” Jurnal Arjuna : Publikasi Ilmu Pendidikan, Bahasa dan Matematika, vol. 1, no. 6, pp. 290–301, 2023, doi: 10.61132/arjuna.v1i6.356.
J. Iskandar, H. Suhendar, and B. D. Pamungkas, “Analisis Strategi Algoritma Sorting Menggunakan Metode Komparatif pada Bahasa Pemrograman Java dengan Python,” G-Tech: Jurnal Teknologi Terapan, vol. 8, no. 1, pp. 104–113, 2023, doi: 10.33379/gtech.v8i1.3556.
N. Maulida Surbakti, A. Talia, C. Br Perangin-Angin, D. Olivia Nainggolan, N. Devi Friskauly, and S. Ruth Br Tumorang, “Penggunaan Bahasa Pemrograman Python dalam Pembelajaran Kalkulus Fungsi Dua Variabel,” Algoritma : Jurnal Matematika, Ilmu pengetahuan Alam, Kebumian dan Angkasa, vol. 2, no. 3, pp. 98–107, 2024.
Y. Heryanto and T. Wira Harjanti, “Analisis Perbandingan Ruang dan Waktu pada Algoritma Sorting Menggunakan Bahasa Pemrograman Python,” KESATRIA: Jurnal Penerapan Sistem Informasi (Komputer & Manajemen), vol. 4, no. 2, pp. 342–347, 2023.
M. Luthfi Zulfa, B. Nurina Sari, and U. Singaperbangsa Karawang Abstract, “Analisis Perbandingan Algoritma Bubble Sort, Shell Sort, dan Quick Sort dalam Mengurutkan Baris Angka Acak Menggunakan Bahasa Java,” Jurnal Ilmiah Wahana Pendidikan, vol. 2022, no. 13, pp. 237–246, 2022.
I. P. Pujiono, R. B. Trianto, and F. M. Hana, “Perbandingan Efisiensi Memori Dan Waktu Komputasi Pada 7 Algoritma Sorting Menggunakan Bahasa Pemrograman Java,” Jurnal Sistem Informasi dan Sistem Komputer, vol. 9, no. 2, pp. 218–230, 2024, doi: 10.51717/simkom.v9i2.481.
S. M. B. Syed Muqeet Aqib, Haque Nawaz, “Analysis of Merge Sort and Bubble Sort in Python, PHP, JavaScript, and C language,” International Journal of Advanced Trends in Computer Science and Engineering, vol. 10, no. 2, pp. 680–686, 2021, doi: 10.30534/ijatcse/2021/311022021.
Y. A. Sandria, M. R. A. Nurhayoto, L. Ramadhani, R. S. Harefa, and A. Syahputra, “Penerapan Algoritma Selection Sort untuk Melakukan Pengurutan Data dalam Bahasa Pemrograman PHP,” Hello World Jurnal Ilmu Komputer, vol. 1, no. 4, pp. 190–194, 2022, doi: 10.56211/helloworld.v1i4.187.
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 Digital Interdisiplin Jurnal, vol. 3, no. 1, pp. 16–23, 2022, doi: 10.34306/abdi.v3i1.625.
M. B. Sena et al., “Perbandingan Kinerja Algoritma Sorting Dalam Pengurutan Data Menggunakan Bahasa Python,” Prosiding Seminar Nasional Sains dan Teknologi Seri 02 Fakultas Sains dan Teknologi, vol. 1, no. 2, pp. 310–314, 2024.
R. P. Aryanto, A. Nilogiri, and A. E. Wardoyo, “Optimasi Pengurutan Data Bilangan dengan Menggabungkan Algoritma Selection Sort Hybrid dan Bucket Sort,” Edumatic: Jurnal Pendidikan Informatika, vol. 7, no. 1, pp. 39–48, 2023, doi: 10.29408/edumatic.v7i1.12358.
F. A. Hia, “Analisis Perbandingan Algoritma Pengurutan (Sorting) Berdasarkan Kompleksitas Waktu,” 2022.
M. Faridz, T. S. Hidayah, P. Studi, T. Informatika, and P. N. Pontianak, “Perbandingan Algoritma Selection Sort , Shell Sort , Dan Merge Sort Pada Data Sampling Numerik Menggunakan Matplotlib,” vol. 1, no. 2, pp. 253–265, 2024.
C. Song and H. Li, “Improvement of Counting Sorting Algorithm,” Journal of Computer and Communications, vol. 11, no. 10, pp. 12–22, 2023, doi: 10.4236/jcc.2023.1110002.
R. R. Basir, “Analisis Kompleksitas Ruang dan Waktu Terhadap Laju Pertumbuhan Algoritma Heap Sort, Insertion Sort dan Merge dengan Pemrograman Java,” STRING (Satuan Tulisan Riset dan Inovasi Teknologi), vol. 5, no. 2, p. 109, 2020, doi: 10.30998/string.v5i2.6250.
S. M. B. Syed Muqeet Aqib, Haque Nawaz, “Analysis of Merge Sort and Bubble Sort in Python, PHP, JavaScript, and C language,” International Journal of Advanced Trends in Computer Science and Engineering, vol. 10, no. 2, pp. 680–686, 2021, doi: 10.30534/ijatcse/2021/311022021.
D. S. Rita Wahyuni Arifin, “Algoritma Metode Pengurutan Bubble Sort dan Quick Dalam Bahasa Pemrograman C++,” Information System for Educators and Professionals, vol. 4, no. 2, pp. 178–187, 2020.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Journal of Artificial Intelligence and Engineering Applications (JAIEA)

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