RE: [PHP] Fast code to partially flatten an array based on severa l keys?

From: Date: Mon, 01 Jul 2002 03:40:36 +0000
Subject: RE: [PHP] Fast code to partially flatten an array based on severa l keys?
Groups: php.general 
Request: Send a blank email to php-general+get-104618@lists.php.net to get a copy of this message
Sorting - are you sorting the array keys or the values ? If you're sorting the keys, maybe it would be better to have another array that holds a list of keys, sort that, and then use that as a "pointer" to the actual array. If you're sorting the values, then php has a good sort function (uses the quick sort algorithm if I remember rightly) -----Original Message----- From: Morgan Grubb [mailto:morgan@autobuy.co.nz] Sent: Monday, July 01, 2002 1:16 PM To: php-general@lists.php.net Subject: Re: [PHP] Fast code to partially flatten an array based on several keys? Martin, I said I'd let you know how I got on. It's all working, but only realistically for no more than 500 or so records. When I feed it 10000+ records, the machine chokes. So I'm back to textbooks just looking for clues on really fast sorting and searching algorithms. I've written a mostly working quicksort routine, which seems to have cut the time down significantly on searches, so I'll keep plugging away at this. Of course, now that it *appears* to be working, I'm getting a lot more work dumped on me, so finishing it off is going to take a bit longer. =) Morgan Grubb. [snip]

« previous php.general (#104618) next »