Page 4 of 5

Posted: Sun 03 Jul, 2005 3:24 pm
by kv83
leofox wrote:can i make one in basic? Without using the list sort functions of course.
No.

Posted: Sun 03 Jul, 2005 3:30 pm
by leofox
ah whatever, i'll make 1 anyway :P .

But i will not bother you with it.

Posted: Sun 03 Jul, 2005 3:31 pm
by Jim e
Is your algo also a stupid sort? I saw CoBB made one.
Nah, mine runs thourgh the array checking every possible key swaps them into proper place. Since there aren't many keys (there is only a max 255) it's more efficient if the array is quite large, so I guess its more like n*k.

I'm gonna try a fast heapsort, I don't know how quicksort could work on calc without using extra memory.

Posted: Fri 08 Jul, 2005 10:28 pm
by sigma
Jim e wrote:Nah, mine runs thourgh the array checking every possible key swaps them into proper place. Since there aren't many keys (there is only a max 255) it's more efficient if the array is quite large, so I guess its more like n*k.
Same general idea I had, only I wanted to win the prize for "Most Grotesque Abuse of the Stack". :-)

Posted: Sat 09 Jul, 2005 1:11 pm
by coelurus
On quicksort: All that is sent for every recursion is 'left' and 'right', push them, call, extract. Also, don't use quicksort only *big hint* Now that's enough from me :)

Posted: Sat 09 Jul, 2005 2:36 pm
by CoBB
Why would you recurse for the right part? You could just jump back to the beginning of the routine, thanks to quicksort being tail recursive on the second call.

Posted: Sat 09 Jul, 2005 4:14 pm
by coelurus
That's a nice little shortcut :) I usually never get into these when I explain things. First, I think best when I code and second, I want others to think a little too :wink:

Posted: Wed 27 Jul, 2005 1:42 am
by Jim e
Hey. it's the 26th. So what does CoBB win? 84+se, $10000, new car, what? :lol:

Posted: Sun 14 Aug, 2005 8:26 pm
by Timendus
..is it over..? Why hasn't a winner been declared or anything..?
I've been on vacation, and I see I missed this entire thing. Too bad, I just passed the algorithms and complexity class, and would have liked to join the contest :) (Not that there's any point to that anymore :P)

Posted: Sat 20 Aug, 2005 12:33 am
by kv83
Well,

we have a winner. Congrats to CoBB! 15 Bytes is a real achievement! Thanks to all entries, you guys did a great job.

I'm closing this thread now.

Greetings,
kv83

P.s.: sorry for that late reaction

Posted: Sat 20 Aug, 2005 8:10 am
by Kozak
No speed winner? :cry: I tried my best! Congratulations Cobb!

Posted: Sat 20 Aug, 2005 12:15 pm
by kv83
I have no clue how to calculate the speed accurate... Nor do I have enough time to do that.

Posted: Sat 20 Aug, 2005 7:59 pm
by threefingeredguy
Just get a table that says the clock spped of each asm function and add them up.

Posted: Sat 20 Aug, 2005 9:06 pm
by kv83
threefingeredguy wrote:Just get a table that says the clock spped of each asm function and add them up.
As simple as that may sound, it isn't. How do you compare the functions in speed of sorting a array? A routine heavinly depends on the array when it comes to speed. One routine may sort a half-sorted array faster than almost-sorted array, and the other routine sorts a almost-sorted array faster than the half-sorted... you see what I mean?

Posted: Sat 20 Aug, 2005 9:27 pm
by threefingeredguy
Ah yes, my method would only work when they are all sorting the same type of sort the same number of times. My apologies. Is the interrupt frequency constant, because then you could use that. Or you could test them on an 84+ and read in the current clock time, then run the program, then read in the cloc time at the end.