|
|
Stacks Queues and other data structures.
Before anyone asks, no I didnt go back to school, so it's not homework...:-)
with what's available in the FCL and/or data structure coding practice has
anyone compared creating the code for your own linked list, or stack, or
queue, and browsing through it as opposed to using say a TList object? any
benckmarks done? I'd like to know which method is fastest?
--
St�phane Richard
Senior Software and Technology Supervisor
http://www.totalweb-inc.com
For all your hosting and related needs
|
|
0
|
|
|
|
Reply
|
Stephane
|
8/12/2003 1:17:34 AM |
|
Stephane Richard wrote:
>
> Before anyone asks, no I didnt go back to school, so it's not homework...:-)
>
> with what's available in the FCL and/or data structure coding practice has
> anyone compared creating the code for your own linked list, or stack, or
> queue, and browsing through it as opposed to using say a TList object? any
> benckmarks done? I'd like to know which method is fastest?
I have written a Hash unit (a hash is like an array except that you can
use Strings as indexes). I translated some parts of Perl's C-source
(version 5.6.1) to Pascal - so I think performance is not that bad.
See http://www.behrenhoff.de/pascal/hash.zip
I'm sure I have used and wirtten Queues and Stacks but have never done
benchmarks.
Wolf
|
|
0
|
|
|
|
Reply
|
Wolf
|
8/12/2003 9:50:16 AM
|
|
Wolf Behrenhoff wrote:
> Stephane Richard wrote:
> >
> > with what's available in the FCL and/or data structure coding
> > practice has anyone compared creating the code for your own
> > linked list, or stack, or queue, and browsing through it as
> > opposed to using say a TList object? any benckmarks done?
> > I'd like to know which method is fastest?
>
> I have written a Hash unit (a hash is like an array except that
> you can use Strings as indexes). I translated some parts of
> Perl's C-source (version 5.6.1) to Pascal - so I think
> performance is not that bad.
> See http://www.behrenhoff.de/pascal/hash.zip
I have made available a generic hashing library in C, which should
easily be translated to Pascal since it does not use realloc.
See:
<http://cbfalconer.home.att.net/download/>
and select hashlib.zip.
Porting to Pascal will require about 15 or so separate types
because new cannot use an arbitrary size (and still adhere to
standards). This will be the major logical change from C to
Pascal. Some extensions over ISO 7185 Pascal are needed to handle
saving function pointers. Extended (ISO 10206) Pascal should be
very adequate.
Hash tables are not much like arrays. They access items via a
key, in O(1), but the resemblance pretty well stops there. The
various demo programs in hashlib.zip show how to access all items
sequentially, or in sorted order, etc.
--
Chuck F (cbfalconer@yahoo.com) (cbfalconer@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
|
|
0
|
|
|
|
Reply
|
CBFalconer
|
8/12/2003 9:44:13 PM
|
|
|
2 Replies
491 Views
(page loaded in 0.049 seconds)
Similiar Articles: Stacks Queues and other data structures. - comp.lang.pascal.misc ...Before anyone asks, no I didnt go back to school, so it's not homework...:-) with what's available in the FCL and/or data structure coding practice ... writing robust software? - comp.lang.c++.moderatedIn other words, use smart pointers for objects (like ... to boost::shared_ptr or some other kind of data structure. ... which objects are reachable from threads and stacks ... Sharing Data Between Processes - comp.os.ms-windows.programmer ...There is no other way to actually communicate between processes ... always be ... A simple template class to create memory-mapped shared data structures.; Author: Ryan ... Odd BACKUP error: unsupported file structure ! - comp.os.vms ...The other *.EPS files in that directory are also ... If so, it would point to data structure problems as opposed to ... High run queue length; why? - comp.unix.solaris Odd ... one producer thread, one consumer thread: mutex needed? - comp ...... about being told that data is there and then getting nonsense in the buffer because it hasn't been delivered yet. ... is a shared, counted queue of structures ... linux shared memory synchronization objects - comp.unix.programmer ...then the other day someone posted an interesting ... are not self-contained: their waiting queues ... project devided into several shared object ... data structures ... FAQ -- assembly-language/x86/general/part1 - comp.lang.asm.x86 ...MASM, TASM, and other commercial assemblers NASM ... EMS and Mouse functions; BIOS and DOS data structures ... I mean I like searching through "the stacks ... Exporting data tied up in a VAX/VMS system - comp.os.vms ...... transfer it over a network to some other system to copy the data on to." ... lost it... > I think it's all on those stacks ... VAX/VMS Internals and Data Structures: Version 5.2 ... Why can OS kernel only use maximum 2GB memory? - comp.lang.asm.x86 ...To expand on th other posts, there is no such ... will likely require at *least* a dozen bytes of data structure ... Message queue sizing on Linux - comp.databases.ibm-db2... TCP MSS issue - comp.unix.programmerWell, there is (or was?) also the other ... all kind of protocols and protocol stacks. It ... lost and in the meantime additional data has been placed in the output queue. Stacks &Queues - Data Structures and Algorithms in C++ - Data ...Stacks &Queues Data structures and Algorithms Acknowledgement: These slides are adapted ... Auxiliary data structure for algorithms Component of other data structures Stacks Queues and other data structures. - comp.lang.pascal.misc ...Before anyone asks, no I didnt go back to school, so it's not homework...:-) with what's available in the FCL and/or data structure coding practice ... 7/23/2012 6:07:37 PM
|
|
|
|
|
|
|
|
|