> Is there a faster way to copy sections of a dynamic to another array of the
> same type? For example, I have two dynamic arrays of the same type, and
> want to copy a section of the one array to a temporary array used for
> sorting and searching. Using the Copy Function seems to be a timely
> process.

For the task you describe there is another much faster way. I personally 
created long time ago for similar purposes a class called TSZTableSort - 
universal class which  provide optimized qsort as well as binary search. 
Approach is very simple and you can create similar by your presonal needs.

Instead to create another copy of original data for specific range, you can 
create an array with pointers on desired original array elements - TList can 
be used as well. Then simply sort and search trough that layer, that way 
keeping intact original data. 

Speed acceleration is clear: only necessary time is to create list of pointers 
to desired number of original elements and it sorting.

Sasa
--
www.szutils.net

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to