Sorting a large variable list VERY quickly. 
Author Message
 Sorting a large variable list VERY quickly.

        Does anyone know how to sort a very large array (over 10,000)
into alphabetical order as quick as possible. An ideal solution would
be to load them into an unlimited listbox with the 'sorted' proprty set
to true, and then putting the sorted list back into the variable again.

        The only piece of code that I know of works fine with small
lists(50-200) but anything larger and you would be in for a very long
night!

Anyone got any ideas ?

--
Mr J.



Fri, 17 Oct 1997 03:00:00 GMT  
 Sorting a large variable list VERY quickly.

says...

Quote:

>        Does anyone know how to sort a very large array (over 10,000)
>into alphabetical order as quick as possible. <snip>

I believe the latest issue of Visual Basic Programmers Journal has an
article on sorting.  It includes source code for a Quicksort that should
handle your problem.

--

Systems Analyst         WWW:    http://www.phoenix.net/USERS/getj



Sat, 18 Oct 1997 03:00:00 GMT  
 Sorting a large variable list VERY quickly.

In this month's VB programmers journal, there's an article on sorting
procedures.  You might want to pick up a copy and give it a shot.  
Unfortunately, I haven't read the article yet, just looked at it and
decided that I'd read it when I have to sort something.

You know, you could put the items in a list box and have the list box
sort them, and then write them back to a file, I've used that method and
it seems to work fine, although I only had 500 items in it.

:       Does anyone know how to sort a very large array (over 10,000)
: into alphabetical order as quick as possible. An ideal solution would
: be to load them into an unlimited listbox with the 'sorted' proprty set
: to true, and then putting the sorted list back into the variable again.

:       The only piece of code that I know of works fine with small
: lists(50-200) but anything larger and you would be in for a very long
: night!

: Anyone got any ideas ?

:  

: --
: Mr J.

 ---------------------------------------------------------------------
 : Internet Direct (416)233-2999  128 lines, SLIP, 9600 - 28,800 bps :
 ---------------------------------------------------------------------



Sat, 18 Oct 1997 03:00:00 GMT  
 Sorting a large variable list VERY quickly.

(Julian Jimenez) says:

Quote:

>        Does anyone know how to sort a very large array (over 10,000)
>into alphabetical order as quick as possible. An ideal solution would
>be to load them into an unlimited listbox with the 'sorted' proprty set
>to true, and then putting the sorted list back into the variable again.

Buy any good book on algorithms and you'll find quicksort and shellsort
algorithms that'll do exactly what you want. Any professional programmer
should have such a reference book, you won't regret it. Anyone out there
care to name their favourite (Knuth is a little long in the tooth in that
most of the code is in pseudo-assembler, though his books are still
useful).


Sat, 18 Oct 1997 03:00:00 GMT  
 Sorting a large variable list VERY quickly.

Quote:

>    Does anyone know how to sort a very large array (over 10,000)
> into alphabetical order as quick as possible. An ideal solution would
> be to load them into an unlimited listbox with the 'sorted' proprty set
> to true, and then putting the sorted list back into the variable again.

>    The only piece of code that I know of works fine with small
> lists(50-200) but anything larger and you would be in for a very long
> night!

> Anyone got any ideas ?

VBIT (Visual Basic Invisible Tools) will do the job in a few seconds.
Put the text strings into a VBIT table (up to 16k lines) and call
ITabFastSort or ITabSmartSort. Sample code for reading a text file,
sort it and write a new file:

        myTab& = ITabRead (fileIn$, IT_TEXTFILE)
        ITabFastSort myTab&, 1
        res% = ITabWrite (myTab&, fileOut$, IT_TEXTFILE)

That's all !

VBIT is shareware ($65) and can be downloaded from:

        ftp://ftp.vestnett.no/pub/pro/idb/ vbit120.zip
        http://www.vestnett.no/~idb/



Sat, 18 Oct 1997 03:00:00 GMT  
 Sorting a large variable list VERY quickly.

Quote:


>says...

>>        Does anyone know how to sort a very large array (over 10,000)
>>into alphabetical order as quick as possible. <snip>

A quick sort is just what you need and they are easy to write.  Watch
out for samples that use a variant or floating point variable for
their counters (speed counts here).

If you really want some speed get the assembly versions using
Crescent's QuickPak Pro or MicroHelp's Muscle.  I prefer Crescent but
they both offer very fast sorting.



Sat, 25 Oct 1997 03:00:00 GMT  
 Sorting a large variable list VERY quickly.

Quote:
> ...
> Does anyone know how to sort a very large array (over 10,000)
> into alphabetical order as quick as possible?
> ...

If you're trying to sort an array of strings, I have a quicksort DLL that
will do that (very fast).  Email me for the source if you want.

Mani Visweswaran



Sat, 25 Oct 1997 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Need VERY large numeric variables (maybe as large as 1MB)

2. Quickly sorting records......

3. Largest Variable for the Long variable type

4. Populate List Box with Large List

5. Populating a List Box with a large list

6. QUICKLY get list of directories?

7. very large sorts

8. Ann: Sorting large data volumes with complex criteria

9. Ann: Sorting large data volumes with complex criteria

10. Ann: Sorting large data volumes with complex criteria

11. Need to sorting large amounts of external data?

12. Sorting large arrays

 

 
Powered by phpBB® Forum Software