Re: fast integer sort

new topic     » goto parent     » topic index » view thread      » older message » newer message

>Mike wrote:
>> Ok. What do I do now. Maybe I should study bucket_sort() and
>> try to make it faster (Yeah, Sure!).
>> Surprisingly, it worked. Of course, if Rob had really wanted to he
>> could easily have optimized his code.

>Rob wrote:
>I think you over-optimized your routine - it doesn't sort anymore.
>
 Oh dear! Try this..

--replace this line
q=repeat(0,100000) + rand(100)

--With these
q=repeat(0,100000)
for i = 1 to length(q) do
    q[i]=rand(100)
end for

michael at igrin.co.nz

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu