VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

NitroSort

Brian Cidern  (4 Submissions)   String Manipulation   Visual Basic 3.0   Beginner   Wed 3rd February 2021

Sort Arrays at lightning speeds!
I guess you could say this is the sequal to
the TurboSort routine I recently uploaded.
One of the comments pointed out that the CopyMemory API was about as fast as VB could swap strings, but the sort algorythm (BubbleSort) was poor and that the QuickSort algorythm was much faster.After some searching on the mothership, I found
out how the QuickSearch algorythm worked and
viola, here it is. This truely is fast. Here are
the tests results.
My system is a P233 with 128MB of RAM. I generated
an array of 10,000 rows. Each row contained 100
random characters ranging from A-Z.
I performed three tests. Here are the times in
milliseconds.
BubbleSort QuickSort
Test 1 131,195.3 398.438
Test 2 131,351.6 421.875
Test 3 130,882.8 390.625

Whew!

Assumes
Create a standard EXE and throw in Command1. Paste the rest, buckle your seatbelt and fly!!!

Rate NitroSort (5(5 Vote))
NitroSort.bas

NitroSort Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters