Results 1 to 40 of 47

Thread: VB6 Dual-Pivot-QuickSort

Threaded View

  1. #34

    Thread Starter
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    Re: VB6 Dual-Pivot-QuickSort

    Quote Originally Posted by Steve Grant View Post
    Olaf you once showed me how to use StrCmpLogicalW(StrPtr(S1),StrPtr(S2)) with a standard QuickSort.

    I would now like to use the DualPivot-Quicksort and have tried replacing all the comparisons (If M1<M2) etc with the StrCmpLogicalW equivalent but it is VERY slow. Can you show how you would do it please.
    Ok, here's a Variant which is using a CallBack-ClassInstance that implements an IStringCompare-Interface
    (so that you can decide on the outside about the String-Comparisons/Collations, by simply passing an appropriately implemented ClassInstance along):
    DualPivotQuickSortString.zip

    @loquat
    Here's the Result compared to the QSort2 you've posted, when both Algos are using the faster of the currently two ClassCallBack-instances
    (cCompareBinary - for case-sensitive String-Comparisons - the other one, not used in the Test, is cCompareNoCase):


    HTH

    Olaf
    Last edited by Schmidt; Jul 26th, 2017 at 04:47 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width