I. Introduction
Ascending algorithm enjoys important applications in fields such as automatic control, artificial intelligence[1-2]. As an important ascending algorithm, the simple selection sorting method (ascending algorithm) aims to arrange a group of known disordered data daba[0], daba[1], daba[2],… daba[n-1] in ascending order. The sorting principle is as follows [3–4]. First, find out the smallest element daba[k] among daba[0], daba[1], daba[2], … daba[n-1], swap the values of daba[0] and daba[k] through a mediation variable. This process is called first-run sorting. After the first-run sorting, the value of daba[0] must be the smallest in this group of data. Then, daba[1] to daba[n-1] are treated in the same way, so that the value of daba[1] must be the smallest among daba[1] to daba[n-1]. Afterwards, daba[2] to daba [n-2] are handled in the same way, and so on. After a total of n-1 treatments, daba [0], daba [1],…… daba [n-1] are arranged in ascending order. The advantages of this ascending method lie in the simple comparison principle and the relatively stable ascending sequence. As for the disadvantage, the speed is slow, only two data can be switched each time, and only one data can be reduced in each trip. Essentially, the simple selection sorting algorithm is comparison, subscript assignment and data exchange. Literature [5–6] studies the stability of simple selection sorting algorithm. In literature [7], the record with the biggest keyword is exchanged with the n-i+1 record, so as to reduce the number of comparisons used in simple selection sorting. Literature [8] uses two break statements to improve selection sorting, and the improved algorithm uses fewer comparisons in sorting. Inspired by literature [7–8] and taking the ascending algorithm as an example, this paper uses a break statement to improve two different ascending algorithms that only use the main function for simple selection sorting and call function for simple selection sorting. If no value is assigned in a certain inner loop, it indicates that the data has been ascended in order. In this study, while loop statement is used to replace the outer loop, and break statement is used to control the number of comparisons used in the ascending order. The improved algorithm not only supports the ascending order, but also effectively reduces the number of comparisons used in the ascending order, thus saving time.