Silas, Faki and Musa, Yusuf and Joyce, S (2017) Empirical Performance of Internal Sorting Algorithm. British Journal of Mathematics & Computer Science, 20 (1). pp. 1-9. ISSN 22310851
Silas2012016BJMCS29238.pdf - Published Version
Download (312kB)
Abstract
Internal Sorting Algorithms are used when the list of records is small enough to be maintained entirely in primary memory for the duration of the sort, while External Sorting Algorithms are used when the list of records is large enough to be maintained in physical memory hence a need for external/secondary storage for the duration of the sort. Almost all operations carried out by computing devices involve sorting and searching which employs Internal Sorting Algorithms. In this paper, we present an empirical analysis of Internal Sorting Algorithms (bubble, insertion, quick shaker, shell and selection) using sample comprising of list of randomly generated integer values between 100 to 50,000 samples. Using C++ time function, it was observed that insertion sort has the best performance on small sample say between 100 to 400. But when the sample size increases to 500, Shaker sort has better performance. Furthermore, when the sample grows above 500 samples, shell sort outperforms all the internal sorting algorithms considered in the study. Meanwhile, selection sort has displayed the worst performance on data samples of size 100 to 30,000. As the samples size grows to further to 50,000 and above, the performance of shaker sort and bubble sort depreciates even below that of selection sort. And when the sample size increases further from 1000 and above then shell sort should be considered first for sorting.
Item Type: | Article |
---|---|
Subjects: | Open Research Librarians > Computer Science |
Depositing User: | Unnamed user with email support@open.researchlibrarians.com |
Date Deposited: | 09 May 2023 11:50 |
Last Modified: | 05 Feb 2024 04:51 |
URI: | http://stm.e4journal.com/id/eprint/901 |