Forum Overview :: Xenosaga
 
My observations of sorts by Ray of Light 11/22/2005, 12:40pm PST
I was disappointed to see your post fail to deliver on the promise of its author field. Just in case I'm not the only one, I will do what you lack the will to, and provide a breakdown of the sorting scene:

Bubble: this is the sort you start out with, and you should look to replace it as soon as possible. Some people will keep it around for small jobs, but the risk of unexpected data growth creates massive liabilities. Just say no.

Quick: the mainstay of most sorting arsenals, and it's hard to beat the versatility: it can invert, it can tidy, it's stable and it's almost always fast. Still, you can catch a lot of donks out when they expect their shiny toy to do all the work for them. One minute, he's flashing a textbook implementation around like he's cock of the walk; next minute, look, there's an ordering tailored to his naïve partitioning heuristic and BAM! it's Welcome Wagon time in Quadratic-Runtime Town. Or better yet, he'll mate the sort with a data structure or storage medium that can't pay the heavy insertion toll and all I have to do is sit back and laugh while the cumulative insertion time bleeds him out. Economizing on comparisons only gets you halfway, folks.

Radix: I call this one the "troll-sort:" some noob will reinvent it and claim to have discovered general-purpose sorting in linear time. There's nothing more satisfying than mentioning the runtime costs imposed by radices of arbitrary size, and then picturing the gobsmacked look on his or her stupid face. Still, it was built to take down big lists of phone numbers and is unmatched in this regard. Don't pass up a chance to see it at work against one of those, doing the thing it does best.

Selection / Insertion: I group them under the banner of "sorts I can code without looking them up". A lot of people ignore them because they are slow, but I still like to bring them in sometimes. If your quicksort is going to get mired, it will be on the tail-end, so let your heavies break the entropic back of an unordered set, then go oldschool to mop up.

Heap & Merge: I'll cover these in a later installment, "The Exotics".
PREVIOUS REPLY QUOTE
 
Asshole... by mysterio 03/21/2003, 9:36pm PST NEW
    We've got to start putting up more Creexul reviews -nt- NT by Entropy Stew 03/21/2003, 9:42pm PST NEW
        Yeah seriously... by Chairman Mao 03/21/2003, 9:44pm PST NEW
            too late (nt) by foogla 03/22/2003, 6:54am PST NEW
    Obviously, you are a pedophile. by Jhoh Creexul 03/21/2003, 10:00pm PST NEW
    Re: Asshole... by Ice Cream Jonsey 03/22/2003, 1:26pm PST NEW
        Re: Asshole... by Jhoh Creexul 03/22/2003, 8:48pm PST NEW
    In other words... by Bill Dungsroman 03/25/2003, 11:42am PST NEW
        Re: In other words... by An observer of sorts. 11/21/2005, 3:43pm PST NEW
            Another satisfied customer. by laudablepuss 11/21/2005, 3:58pm PST NEW
                Re: Another satisfied customer. by An observer of sorts. 11/21/2005, 4:06pm PST NEW
                    My, what an ego you have. by laudablepuss 11/21/2005, 4:26pm PST NEW
                        Oh wait. by laudablepuss 11/21/2005, 4:34pm PST NEW
                    Re: Another satisfied customer. by Entropy Stew 11/21/2005, 4:27pm PST NEW
            Goddamn you're a fag. by Mysterio 11/21/2005, 4:04pm PST NEW
            You've convinced me of your smartness! by Fussbett 11/21/2005, 4:18pm PST NEW
            "randome nonsense that isn't properly spelled" NT by Indeed. 11/21/2005, 4:25pm PST NEW
            Re: In other words... by Mister Helper! 11/21/2005, 5:54pm PST NEW
                Tuesday isn't until tomorrow. =( NT by Fullofkittens 11/21/2005, 6:39pm PST NEW
            Ha ha you're a fuckin faggot. NT by Creexul :( 11/21/2005, 6:27pm PST NEW
                You are so unethical. NT by MM 11/21/2005, 7:57pm PST NEW
            the highschool debate club sure does fire off them zingers NT by FA-BI-OH! 11/21/2005, 9:22pm PST NEW
                *cough* NT by Irony 11/23/2005, 7:27am PST NEW
                    *explain* NT by Irony's friend who does get things. 11/23/2005, 10:19am PST NEW
                    OMG BIRD FLU NT by laudablepuss 11/23/2005, 10:26am PST NEW
                    *cough* NT by Dictionary 11/24/2005, 11:28pm PST NEW
                        Two Laudable's and a (typically) weak Fabio. It just gets better. NT by Irony 11/25/2005, 1:07am PST NEW
                            weak NT by Mysterio 11/25/2005, 1:52am PST NEW
                                *cough* NT by Irony 11/25/2005, 2:01am PST NEW
            OMG SHUT UP BITCH!!111!!!11!1one LOLZ NT by OMG LOL UR SUCH A N00B 11/21/2005, 9:42pm PST NEW
            Box quote! by Wow! 11/21/2005, 11:33pm PST NEW
                unfortunately, I must join the crowd on this one. by casual observer 11/22/2005, 1:55am PST NEW
            My observations of sorts by Ray of Light 11/22/2005, 12:40pm PST NEW
 
powered by pointy