Article View: gnu.chess
Article #5025Re: Speed up UpdatePieceList
From: Dietrich J. Kappe
Date: Mon, 30 May 1994 21:00
Date: Mon, 30 May 1994 21:00
18 lines
1686 bytes
1686 bytes
In article <2s678r$h7m@nuscc.nus.sg> nsrccks@leonis.nus.sg (Chua Kong Sian) writes: I'll talk about the pick() routine first as its easier :). The post is right that pick() is a bubble sort (or maybe selection sort which is just as bad). However most of the time it is unnecessary to completely sort the movelist. This is because if a move is "picked" and causes a beta cut, then the rest of the moves need not be searched and thus any effort spent in sorting them would have been wasted. So IMHO, I think pick() works pretty efficiently. If you're going to sort a short list with an O(n^2) time algorithm, its better to use insertion sort. That way, if the list is already close to being in order, you get close to linear performance. -- Dietrich Kappe kap1@wimpy.cpe.uchicago.edu -finger for PGP public key-
Technical Details
Message-ID:
<KAP1.94May30150008@wimpy.cpe.uchicago.edu>Path:
arc1-ca.pugleaf.net!gmd.de!nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!wimpy.cpe.uchicago.edu!kap1References:
<CoGEL1.5Ao@cs.ruu.nl> <2rqmo3$34j@search01.news.aol.com> <DSPENCER.94May26114347@mproj.retix.com> <2s678r$h7m@nuscc.nus.sg>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d71d,a6b1257a1c386acf X-Google-Attributes: gid10d71d,public X-Google-ArrivalTime: 1994-05-30 13:11:43 PST Newsgroups: gnu.chess Path: arc1-ca.pugleaf.net!gmd.de!nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!wimpy.cpe.uchicago.edu!kap1 From: kap1@wimpy.cpe.uchicago.edu (Dietrich J. Kappe) Subject: Re: Speed up UpdatePieceList In-Reply-To: nsrccks@leonis.nus.sg's message of 28 May 1994 01:37:31 GMT Message-ID: <KAP1.94May30150008@wimpy.cpe.uchicago.edu> Sender: news@uchinews.uchicago.edu (News System) Organization: Center for Population Economics References: <CoGEL1.5Ao@cs.ruu.nl> <2rqmo3$34j@search01.news.aol.com> <DSPENCER.94May26114347@mproj.retix.com> <2s678r$h7m@nuscc.nus.sg> Date: Mon, 30 May 1994 21:00:08 GMT Lines: 18