Results 1 to 8 of 8

Thread: C# sort implementation that's as fast or faster than Array.Sort?

Threaded View

  1. #8

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Location
    cali
    Posts
    243

    Re: C# sort implementation that's as fast or faster than Array.Sort?

    How come when using a separate routine for swapping as in
    Code:
    public static void Swap(ref int a, ref int b) {
    int swp = a;
    a = b;
    b = swp;
    }
    It adds about +15% to time (for QuickSort) it takes to sort when compared to putting the swapping code inside the Swap routine itself?

    Is there a way to not make it slow down?

    MSDRadix doesn't seem to be much of an improvement.
    How does it compare to 3Way QuickSort?
    Or this thing:
    http://www.codeproject.com/KB/cs/fas...display=Mobile

    ^I think I remember trying that with Integers and it didn't work (result was still out of order).
    Last edited by ICESTORM; Mar 12th, 2011 at 04:13 AM.
    ......

Tags for this Thread

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