VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Extremely Fast Case-Insensitive Unicode String Array Sorting Class

by Rde (54 Submissions)
Category: String Manipulation
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (8 Votes)

Extremely Fast Case-Insensitive Unicode String Array Sorting Class (Revision II)
***********************************************
This string sorting class is extremely fast at case-insensitive sorting operations due to the
combination of a highly optimized Blizzard quicksort algorithm, extremely fast in-place
unicode comparison thanks to Ralph Eastwood, and a unique textual compare lookup table that is built only once at initialization in just over one hundredth of a second thanks to LukeH, and stored in a long array which is accessed in-line to minimize the case-conversion impact on this supremely fast comparison algorithm. Its performance on case-insensitive operations is only slightly slower than its case-sensitive binary compare operations, and is well over two times faster than StrComp's textual compare mode when used within the very same algorithm. Turning off strict compatibility with VB's StrComp function will improve performance on case-insensitive operations even further.
***********************************************
Special thanks to the following for their generous contribution
to this sorting class:
*****************************
QuickSort Origins ~ C.A.R. Hoare ********************
String Comparison ~ Ralph Eastwood (tcm) *************
LowerCase Conversion ~ LukeH (selftaught) ************
SafeArray Substitution ~ Luke, Ralph, & Rd
***********************************************
Blizzard quicksort algorithm and in-line lookup table by Rd :)
***********************************************
Revision I - Fixed potential bug! Added demo project.
***********************************************
Revision II - Fixed null-string descending bug!

API Declarations
' Array boundaries and data type limits
' are carefully managed in this class.
' There-fore, advanced compiler
' optimizations can be set however
' you see fit, with one exception -
' this class will error if you set
' the Assume No Aliasing option.

Rate Extremely Fast Case-Insensitive Unicode String Array Sorting Class

Download Extremely Fast Case-Insensitive Unicode String Array Sorting Class

Download Extremely Fast Case-Insensitive Unicode String Array Sorting Class (1 MB)

Extremely Fast Case-Insensitive Unicode String Array Sorting Class Comments

No comments have been posted about Extremely Fast Case-Insensitive Unicode String Array Sorting Class. Why not be the first to post a comment about Extremely Fast Case-Insensitive Unicode String Array Sorting Class.

Post your comment

Subject:
Message:
0/1000 characters