Patent ID: 7680791

Claim:
A method for sorting a set of items, based on one or more sort keys, using a quicksort algorithm, wherein each item in the set of items has one or more key values that are represented by an array of one or more bytes, and wherein the set of items can be ordered based on the arrays, the method comprising the computer-implemented steps of: while performing a first partitioning operation on the set of items to partition the set of items into subsets of items, based on a first comparison between (a) the key value for each item in the set of items and (b) a first pivot value associated with the first partitioning operation, determining a total amount of common prefix bytes that exist among all key values for items partitioned into a first subset of items; and storing in computer memory a first number that indicates the total amount of common prefix bytes that exist among all key values for items partitioned into the first subset of items; performing a second partitioning operation on the first subset of items to partition the first subset of items into second subsets of items, based on a second comparison between (a) the key value for each item in the first subset of items and (b) a second pivot value; wherein, for each item in the first subset of items, the second comparison does not take into account the first number of common prefix bytes associated with the first subset of items; wherein the method is performed by one or more computing devices.