I think the best way to explain Condor is to start by it’s name. I didn’t name it myself, it named itself. The name CO/ND/OR is broken down into 3 parts, “CO” stands for Counting, “ND” stands for Anding and “OR” well of course stands for Oring. When the words come to together as Condor it explains one last behaviour “Soaring” over data.

So now that’s put aside, the reason I even created a new sorting algorithm was because I am impatient for anything that takes more than a few seconds, I believe it leaves the user with a bad experience. I needed to sort around +/-10,000,000 records and using either Apple’s builtin search for NSArray’s (sortedArrayUsingSelector) or Microsoft Array.Sort methods were both extremely slow. So I first wrote several other common algorithms like Quick, Merge, Heap, Radix, and Insertion sort in hopes to find one that used very little memory and fast. That’s the problem, Radix is lightening fast but uses a lot memory, and if you write an inline version of it, it becomes much slower. This also held true for Merge and Heap sort. Quick sort is fast but no where near as fast as Radix and lastly Insertion is super fast but for very small sets and is super slow on large sets.

So where does Condor fit within all these other algorithms, well that is hard to say since real world data combinations can be mixed in a lot of ways. Just imagine how many different ways 10,000,000 possible numbers combinations there are when your range is 0-4294967295. What I will say is that in EVERY single test I performed, which is well over 500,000 (batched over a few nights) Condor was the fastest and it used <4MB of memory (space O(k) where k<4MB) across all the Condor sorts. This is much less than Radix, Merge and Heap sort (space >= O(n) where n is the size of the array) which needed at least a whole copy of the sorting array. Quick sort and Insertion sort didn’t use any additional memory but Insertion was painfully slow while Quick was simply put pretty quick.

Condor Space Time Complexity

Space: O(k) where is always <= 4MB

Time: O(n)

I could now present you with a lot of data test results which in sorting doesn’t mean much if the real world data sets are always the algorithms worst case scenario. So I will do one better, I will let you test out Condor yourself and you tell me.

Apple Objective C and Swift Framework

For Apple Xcode Developers who write in Objective C and Swift, you have a new ULTRA LIGHT weight Framework available on GitHub which also has super easy examples for System Types and NSArray with NSNumber objects.

https://github.com/thomasrunner/Condor

Microsoft C# Nuget for .NET and .NETCore

For Microsoft Visual Studio this is a Class Library targeting .NET Standard 1.0 which basically means it has no real .NET requirements and should work on every project from Windows 10 to .NET websites or .NETCore websites, you can find an ULTRA LIGHT Nuget package available for download here:

https://www.nuget.org/packages/Condor/

Ok, just in case you want a little proof here is some results run in Visual Studio 2017.

This slideshow requires JavaScript.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s