Re: non-recursive quicksort for 2-D arrays?



On Sat, 6 May 2006 07:56:52 +0100, "RB Smissaert"
<bartsmissaert@xxxxxxxxxxxxxxxx> wrote:

<snip>

All I am lookin for now is the fastest possible sort to sort this index
array.
This one is fast:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=28549&lngWId=1
But I can't get it to work yet.

When you get the 'fastest' working, you'll find that the second
'fastest' is so quick that you'll not be able to measure the
difference.

IMO the best bet is to get an algorithm that you know will always work
and will always use exactly the same amount of memory.

For the last 16 years I've been sorting non-trivial things on disk as
files, a one second wait for 50,000 records is quite acceptable.


.



Relevant Pages

  • Re: Where is this array stored in memory?
    ... how the array is declared and what statements do the allocation. ... The possible relevance is that sometimes dynamically allocating ... arrays can help by using only as much memory as the particular ... > wrote the array on disk after each iteration, ...
    (comp.lang.fortran)
  • Starting an Application
    ... I am storing application data as a byte array in my database. ... back to a file on disk to enable the parent application to run it or can I ... somehow avoid disk operation and activate the application form the file ... contents in memory in the form of a memorystream or some other in memory ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Memory Useage
    ... the disk using sequential_io. ... and an array is then created based on how ... the size of the largest variant much larger than the size of the most ... This increases memory overhead by allocating more blocks from the heap, ...
    (comp.lang.ada)
  • Re: ForwardOnlyMemoryStream?
    ... array it's using for storage, so it would have to create a new array and copy the remaining data to it. ... This could cause even more memory problems than you have now... ... I would suggest that you make your own stream reader class that uses a large buffer, that way you reduce the frequency of the disk access while keeping the memory usage at a controllable level. ... that someone else had already done a smarter memory stream. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Memory Useage
    ... the disk using sequential_io. ... and an array is then created based on how ... I don't know about ObjectAda, but in GNAT the Node_Array would have a size that lets you store the largest variant in every array element, while the Node_Type objects stored in the sequential_io file probably use only as much file-space as the actual variant of each object requires. ... This increases memory overhead by allocating more blocks from the heap, but it may reduce the overall memory requirement if the largest variant of Node_Type is much larger than the average variant. ...
    (comp.lang.ada)