From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA06091 for caml-red; Sun, 3 Dec 2000 23:32:53 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA27917 for ; Sat, 2 Dec 2000 17:03:11 +0100 (MET) Received: from localhost.localdomain (ppp128.dyn147.pacific.net.au [210.23.147.128]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id eB2G2xv17151 for ; Sat, 2 Dec 2000 17:03:02 +0100 (MET) Received: from ozemail.com.au (IDENT:root@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id DAA16885; Sun, 3 Dec 2000 03:00:12 +1100 Message-ID: <3A291C8C.DF869DC4@ozemail.com.au> Date: Sun, 03 Dec 2000 03:00:12 +1100 From: John Max Skaller X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: Mattias Waldau CC: Sven LUTHER , caml-list@inria.fr Subject: Re: sorting of list of vectors (array with one dimension) References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: weis@pauillac.inria.fr Mattias Waldau wrote: > > Nice suggestions changing the data structure, but I can't change it. > > Instead, I implemented the indirection trick by Max Skaller. However instead > of finding how to reorder the data, I just use a temporary data structure > instead. That's easiest, but it would be nice to find a fast way to reorder the array in place, in case you get very large arrays, where constructing a new one would exhaust memory, or slow down the process due to the VM thrashing the disk. -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net