VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Extremely Fast Case-Insensitive Unicode String Array Sorting Class

Rde  (54 Submissions)   String Manipulation   Advanced   Wed 3rd February 2021

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 (10(10 Vote))

Download Extremely Fast Case-Insensitive Unicode String Array Sorting Class

Extremely Fast Case-Insensitive Unicode String Array Sorting Class Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters