VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

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

Rde  (54 Submissions)   Data Structures   Intermediate   Wed 3rd February 2021

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

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

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

No comments yet — be the first to post one!

Post a Comment

0/1000 characters