Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Fast sort? - Bubble Sort!? (Question to Dr. Hyatt)

Author: Michel Langeveld

Date: 09:26:37 10/25/99

Go up one level in this thread


On October 25, 1999 at 10:17:53, Dann Corbit wrote:

>On October 23, 1999 at 10:36:40, Robert Hyatt wrote:
>
>>On October 22, 1999 at 10:03:29, Dann Corbit wrote:
>>
>>>Change to binary insertion and you will see a much bigger benefit.
>>
>>I tried both (from Knuth Sorting and Searching).  Binary is very bad for
>>lists that have 1-5 entries max.  from testing on my machine.  Simple
>>insertion is no faster than the bubble sort I used, but it also turns out
>>to be no slower either, after testing Crafty over 300 different positions.
>>
>>I think I'll leave insertion in, to prevent such discussions in the
>>future, however.  :)
>I have found a new modification to insertion sort (binary or linear) that will
>make a large improvement in speed.  It has to do with the data movements to
>perform the actual insertion.  By delaying the insertion, I can do all data
>movements as a single permutation and never move any element more than once.  It
>won't work for big lists though, since the code size is O(n!).  With just ten
>items there are a million leaves in the tree.  However, for very small sublists
>I think it will do very well.

Best way to prove your statement is code it, and prove it's faster!
Good news by the way.



This page took 0.03 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.