Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!psuvax1!psuvm!cunyvm!byuvax!taylorj From: taylorj@yvax.byu.edu Newsgroups: comp.sys.mac.hypercard Subject: Re: Sorting gets very slow Message-ID: <807taylorj@yvax.byu.edu> Date: 21 Sep 89 04:40:48 GMT Lines: 13 In message <14843@brunix.UUCP>, Mark complains about slow sorting on large stacks. There is no way you can write an XCMD that will sort a stack any faster than HyperCard. I recommend that you solve the problem by keeping the stack in sorted order. When a new card is inserted you can do a binary search (which in large stacks will actually be faster than HyperCard's built in search) to find the correct position for the new card and then insert it in that position. This way you will never have to sort the stack. Jim Taylor Microcomputer Support for Curriculum | Brigham Young University | Bitnet: taylorj@byuvax.bitnet 101 HRCB, Provo, UT 84602 | Internet: taylorj@yvax.byu.edu