"QuickSort".....thats the standard sort isn't ??
Jeremy Coulter
Application Developer
Application Development Centre
Compaq Computer New Zealand Ltd.
Phone: 64 3 371 5724
Fax: 64 3 371 5724
Mobile: 64 0212533214
E-mail: [EMAIL PROTECTED]
Personal Email: [EMAIL PROTECTED]
-----Original Message-----
From: Nahum Wild [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 18, 1999 10:00 AM
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Sorting - day 2
You could of course set the stringlists duplicate property to 'dupAccept' to
allow duplicates.
In terms of speed, I have used the TStringList quicksort code to sort about
40,000 strings in under 1 second. Each string consisted of 42 random
characters. This was run under delphi on a p166 with 64 mb ram and NT4.
Nahum
-----Original Message-----
From: Neven MacEwan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 18 November 1999 09:23
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Sorting - day 2
Jeremy
When you sort a Tstringlist it only allows unique entries! hence your 1600
Regards
Neven
----- Original Message -----
From: Jeremy Coulter <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Thursday, 18 November 1999 08:32
Subject: [DUG]: Sorting - day 2
> Hi all.
>
> I followed alead that suggested I try setting the sorted to true BEFORE I
> load the file in to the TStringList.
> This does speed it up.....BUT instead of there being 38,000 lines, I only
> get 1600 !! figure THAT one out !!
>
> I also did the AddObject thing too, but it actually added time, basically
> cos. I had to read in each line to do the AddObject bit.
> I tried loading the file into another temp TStringlist, then looped
through
> this and did the AddObject bit to another TStringlist, but it made no
diff.
> in time...well maybe a few milliseconds.
>
> Am I just being unrealistic? is 38,000 lines of code processing in roughly
> 10 seconds about right ??
> considering unsorted it takes 2 seconds...
>
> Cheers, Jeremy Coulter
>
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz