VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A ShellSort with a twist Revised and even faster (7 March 2009)

by Rde (54 Submissions)
Category: Data Structures
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (20 Votes)

This shell algorithm is founded on a very solid performer that was originally developed by vb2themax, and optimized further by several very talented coders, before I twisted a little more out of it in this hybrid version.
----
This latest version employs a clever SAFEARRAY substitution technique to trick VB into thinking the four-byte string pointers in the string array are just VB longs in a native VB long array, and is now much faster.
----
Also uses valid addition and subtraction of unsigned long integers to guarantee safe arithmetic operations on memory address pointers.
----
Includes both Shell and ShellHyb algorithms with indexed versions in 25kb class and demo project.
----
Update 21 June 2008 inspired by comments from Roger Gilchrist. Improved indexed sorting support routine to better exploit fast re-sorting performance, and added much needed index sorting documentation.
----
Obscure Bug Fix 7 March 09. I documented they 'can sort sub-sets of the array data' but with the indexed versions if you do an error *could* occur without this very small change.

Rate A ShellSort with a twist Revised and even faster (7 March 2009)

Download A ShellSort with a twist Revised and even faster (7 March 2009)

Download A ShellSort with a twist Revised and even faster (7 March 2009) (6 KB)

A ShellSort with a twist Revised and even faster (7 March 2009) Comments

No comments have been posted about A ShellSort with a twist Revised and even faster (7 March 2009). Why not be the first to post a comment about A ShellSort with a twist Revised and even faster (7 March 2009).

Post your comment

Subject:
Message:
0/1000 characters