Click to See Complete Forum and Search --> : net vs 6 - Sort Test 1


WizBang
July 23rd, 2008, 09:47 AM
I've moved this post from the other sorting thread. This is obviously a better place for it, though it looks out of order due to the time this thread was created.

Well, I checked out the VB6 sorting code in your article (http://www.codeguru.com/vb/gen/vb_misc/algorithms/article.php/c14627/), and was surprised to see that neither QuickSort algo was like the one I've been using. So I added it along with an additional button. Interestingly, I find my algo is about 1/3 faster. I don't recall where I got it, but obviously there are a number of variations out there. I've attached it here.

GremlinSA
July 23rd, 2008, 02:12 PM
This test is to see how fast the two Languages can sort items inside a listbox. there will be more Sorting tests with different types of objects..

The VB6 source code is available on this article (http://www.codeguru.com/vb/gen/vb_misc/algorithms/article.php/c14627/), i saw no need to repost it here..

GremlinSA
July 23rd, 2008, 02:22 PM
Results of this test as run on my Vista dev system..

200 numbers with a max value of 100

VB6:
Bubble : 10780ms
Incertion : 5460ms
Heap : 1731ms
Shell : 873ms
Selection : 281ms
Quick sort 1 : 468ms
Quick sort 2: 577ms

VB.NET:
Bubble : 12418ms
Incertion : 4040ms
Heap : 2075ms
Shell : 1107ms
Selection : 249ms
Quick sort 1 : 468ms
Quick sort 2: 374ms

Because .net wasfaster in some and slower in others, i'd call this one inconclusive..