Abstract

AbstractSorting has an important function in any software system that requires searching, uses SQL, or needs faster recovery after any system crash. Moreover, most data are stored as strings; thus faster string sorting is a blessing. Strings are accessed by reference and any string access requires two memory requests which would slow any string sorting algorithm. On the other hand, integers are accessed by value and any integer access requires one memory request, this means making that integer sorting should run faster than string sorting for the same number of elements and the same algorithm. Based on this hypothesis a methodology was designed which works on any sorting algorithm that could sort either string or integer arrays and makes string sorting runs faster. This methodology has five stages to accomplish the sorting process. First, for a given unsorted string array convert a prefix of every string in this array to an integer and place these integers in a parallel array of records of integers. The results for sequential execution for quicksort, merge, and heap sorts, or O (N log N) algorithms, showed an average speedup factor gain of eleven, eight, and four, respectively, on variable-length strings of alphabets only. Furthermore, after testing this methodology on slow, iterative algorithms with complexity O ( \({N}^{2}\)): bubble sort, selection sort, and insertion sort, the results showed an average speedup factor of 25, 45, and 70, respectively, on variable-length strings of alphabets only.KeywordsString sorting algorithmInteger prefix-based method

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call