Let’s beat the Array.sort for Numbers, lets beat the best as3 implementation of quicksort and lets beat about any AS3 sorting function you have seen so far. Here 2 really fast algorithms to sort floats (or Numbers), FlashSort and Radix ! FlashSort I presented in an earlier post a really fast flashSort implementation for Integers […]

~ read more ~## Posts in category sort

# Radix SortOn

In this post here, I presented a fast sorting function based on radix algorithm. Today, lets make the code a bit more useful by rewriting it to sort an array of objects, with a “key” string to access our sorting key. The desired API: static public function RadixSorOn(iarray:Vector.<Object> , sorted:Vector.<Object> , key:String):void As seen when […]

~ read more ~# More On Radix and FlashSort

Let’s see how well our FlashSort and RadixSort functions are performing under specific conditions: * when the keys in the array are uniques : ex:[9 7 8 1 3 2 5 6 4 7 8] * when the array is already sorted ex:[ 1 2 3 4 5 6 7 8 9] * when the […]

~ read more ~# Sort, faster than FlashSort, Radix !

In a previous post, I presented a very efficient sorting function based on flashsort (“http://guihaire.com/code/?p=552) Can we go faster than that ? After some research, I decided to explore a very promising sorting algorithm : Radix And found some interesting articles for radix optimizations: http://codercorner.com/RadixSortRevisited.htm from Pierre Terdiman, and one from M. Herf http://stereopsis.com/radix.html. So […]

~ read more ~# Super fast SortOn with FlashSort !

In this post Super fast sorting with FlashSort !, I presented a really fast algoryhm to sort integers. What about changing it to try to beat the Array.sortOn, and by this making it more usable ? So as far as the API, we want to go from static public function flashSortInt2(a:Vector.<int> , multiplier:Number = 0.43):void […]

~ read more ~
## Recent Comments