The comparison times for these element sets differ of course. For strings, the randomness ensures that the comparison function usually only needs to compare the first character of each string.
The suitability of the data can be discussed, but I think that it represents a reasonable input selection.
However, measuring the real time has a number of pitfalls. Interrupts, other processes switching in, and system overhead all combine to increase the time. In order to get reasonable accuracy, I timed each combinations of elements for one and four processors ten times (using the same input data), and took the shortest time. Also, I ensured that the system had no other users, and that the system load was less than 5% during the measurements. All considered, I think this gives a reasonable approximation of the algorithm performance.
© Ola Sigurdson 1991-08-20 Ola@Sigurdson.SE