Analisis Komparatif Efisiensi Memori dan Waktu Komputasi pada 8 Algoritma Sorting menggunakan C++
DOI:
https://doi.org/10.28918/logiclink.v2i1.10868Abstract
This study aims to analyze the efficiency of computation time and memory allocation of eight sorting algorithms (Bubble Sort, Selection Sort, Insertion Sort, Quick Sort, Merge Sort, Heap Sort, Counting Sort, and Radix Sort) implemented in C++ programming language. The test dataset consists of three size categories: 100, 1,000, and 10,000 elements, randomly generated with values between 1 and 99. This range was chosen so that the tests are conducted under conditions of limited value and contain a lot of duplication, in order to support consistent efficiency evaluation. The research method involved generating datasets using the random array function, measuring execution time in nanoseconds, and monitoring memory usage through the WorkingSetSize metric. Each algorithm was tested three times on each category of data to ensure consistency of results. The results showed that Heap Sort achieved the fastest execution time on small data (101,266 nanoseconds for 100 elements), Counting Sort and Radix Sort excelled on medium data, while Counting Sort delivered the best performance on large data (1,483,166 nanoseconds for 10,000 elements). Counting Sort also demonstrated stable memory efficiency compared to the other algorithms, whereas Bubble Sort consistently exhibited the poorest performance across all scales. The research conclusion recommends Heap Sort for small-scale data, Counting Sort and Radix Sort for medium-scale data, and Counting Sort for large-scale data. The findings provide practical guidance for developers in selecting algorithms according to data scale and resource availability.
Keywords:
References
Arifin, R. W., & Setiyadi, D. (2020). Algoritma Metode Pengurutan Bubble Short dan Quick Sort Dalam Bahasa Pemprogaman c++. Information System For Educators and Profesionals, 2(No.4), 178–187.
Frühwirth, T. (2010). Union-find algorithm. In Constraint Handling Rules. https://doi.org/10.1017/cbo9780511609886.014
Knuth, D. E. (1998). Art of Computer Programming - Volume 3 (Sorting & Searching) (Second Edi). Addison-Wesley Professional.
Munir, R., & Lidya, L. (2016). Algoritma dan Pemrograman dalam Bahasa Pascal, C, Dan C++ Edisi Keenam. Informatika Bandung.
Poetra, D. R. (2022). Performa Algoritma Bubble Sort dan Quick Sort pada Framework Flutter dan Dart SDK(Studi Kasus Aplikasi E-Commerce). JATISI (Jurnal Teknik Informatika Dan Sistem Informasi), 9(2), 806–816. https://doi.org/10.35957/jatisi.v9i2.1886
Pratama, A., Desiani, A., & Irmeilyana, I. (2018). Analisis Kebutuhan Waktu Algoritma INsertion Sort, Merge Sort, dab Quick Sort dengan Kompleksitas Waktu. In Computer Science and ICT, Vol 2(No. 1), 95-1–6.
Pujiono, I. P., Rachmawanto, E. H., Anisa, N., & Winarsih, S. (2025). Array Sorting Algorithm vs Algoritma Pengurutan Tradisional : Analisis Efisiensi Memori dan Waktu Array Sorting Algorithm vs Traditional Sorting Algorithm : Memory and Time Efficiency Analysis. 15(April), 47–59.
Pujiono, I. P., Trianto, R. B., & Hana, F. M. (2024). Perbandingan Efisiensi Memori dan Waktu Komputasi Pada 7 Algoritma Sorting Menggunakan Bahasa Pemrograman Java. Simkom, 9(2), 218–230. https://doi.org/10.51717/simkom.v9i2.481
Rahayuningsih, P. (2016). Analisis Perbandingan Kompleksitas Algoritma Pengurangan NIlai (Sorting). Jurnal Evolusi, No. 4, 64–75.
Sandria, Y. A., Nurhayoto, M. R. A., Ramadhani, L., Harefa, R. S., & Syahputra, A. (2022). Penerapan Algoritma Selection Sort untuk Melakukan Pengurutan Data dalam Bahasa Pemrograman PHP. Hello World Jurnal Ilmu Komputer, 1(4), 190–194. https://doi.org/10.56211/helloworld.v1i4.187
Saptadi, A. H., & Sari, D. W. (2012). Analisis Algoritma Insertion Sort, Merge Sort Dan Implementasinya Dalam Bahasa Pemrograman C++. JURNAL INFOTEL - Informatika Telekomunikasi Elektronika, 4(2), 10. https://doi.org/10.20895/infotel.v4i2.103
Saputro, F. E., & Khasanah, F. N. (2018). Teknik Selection Sort dan Bubble Sort Menggunakan Borland C++. Jurnal Mahasiswa Bina Insani, Vol. 2(No. 2), 136–145.
Syafnidawaty. (2020). Pengertian Logika Fuzzy. 06 April 2020, II(September), 3.
Ullah, Z. (2016). Understanding Sorting Techniques Using C++. International Journal of Novel Research in Computer Science and Software Engineering, 3(1), 171–199.
Yagci, Y., & Mishra, M. K. (2016). Data and structures. In Handbook of Vinyl Polymers: Radical Polymerization, Process, and Technology: Second Edition. https://doi.org/10.1201/9781420015133.pt5
Downloads
Published
License
Copyright (c) 2025 Muhammad Irfan Ali, Rangga Dzikri Fardiarsyah, Lukman Shodik, Fadilah Zahra Dwi Kinanti, Imam Prayogo Pujiono

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









