9.4. SORTSTR: Sorting Strings
A major task to which computers are applied is the sorting of numeric or string data. In the study of computer science, one encounters numerous sorting algorithms, each with its own strengths and weaknesses. The bubble sort is among the simplest sorting algorithms, and is an excellent choice to demonstrate use of the Itanium ISA for sorting tasks.
The SORTSTR program (Figure 9-4) sorts strings alphabetically according to the sequence of ASCII character codes. It resembles the SCANTERM program (Figure 9-3) in its input and output aspects; it also illustrates some of the principles of the byte-oriented instructions introduced in Chapter 6. A companion program that sorts numeric data is presented later in this chapter. ...
Get Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.