VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Radix sorter

Kevin Hall(Silence)  (1 Submission)   Miscellaneous   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

This code is the second fastest way of sorting a table of values. The only faster way found yet is a variant of this method. Umm... What can I say? It's really fast. Once you understand the concept it isn't too hard to write it in ASM either.

Inputs
A table of values. Its size could be any number of values.

Returns
It returns the values in the list, sorted in ascending order.

Side Effects
This sort basically Requires that you at least temporarily double the memory size of 1.) The array containing the data to be sorted 2.) Any target arrays you have that need to be sorted with it. HINT: If you are sorting things like polygons by their Z values, it is better to leave the polygons in one array and have 2 more. One should contain their Z values, and one should contain a pointer to the triangle that a Z value is associated with. This way you only have to move 2 arrays around ( the one with the Z value and the target) and saves a lot of wavelength.

Rate Radix sorter (2(2 Vote))
Radix sorter.bas

Radix sorter Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters