Board index » delphi » Large Data Structures - Best Handling Methods

Large Data Structures - Best Handling Methods

Not being a great expert on Pascal I'd appreciate a few pointers on
the best way to handle very large data structures ( >64K).

I want to use a group of two dimensional arrays (to give x,y map
information), each of which may (and probably will) exceed 64K.

I've looked at quite a few examples from various places but can't
decide which would be most efficient, particularly speed wise.

Options include, but are not limited to, :

TMemoryStream 's
Pointers to arrays
Pointers to TMemoryStreams
Pointers to Objects
Arrays of Object Pointers.

Which method / s should I be looking at ?

Will Delphi 32 include a data structure to do what I want, and if so
what is the best way of programming now, to allow simple transition
when D32 eventually arrives ?

All help and suggestions gratefully recieved.

 

Re:Large Data Structures - Best Handling Methods


Quote
ca...@larouss.demon.co.uk (Casey Charlton) wrote:
>Not being a great expert on Pascal I'd appreciate a few pointers on
>the best way to handle very large data structures ( >64K).
>I want to use a group of two dimensional arrays (to give x,y map
>information), each of which may (and probably will) exceed 64K.
>I've looked at quite a few examples from various places but can't
>decide which would be most efficient, particularly speed wise.
>Options include, but are not limited to, :
>TMemoryStream 's
>Pointers to arrays
>Pointers to TMemoryStreams
>Pointers to Objects
>Arrays of Object Pointers.
>Which method / s should I be looking at ?
>Will Delphi 32 include a data structure to do what I want, and if so
>what is the best way of programming now, to allow simple transition
>when D32 eventually arrives ?
>All help and suggestions gratefully recieved.

You don't mention what access patterns you have to
support. And what other data may be associated with
map locations. Etc. Do you really need full random
access? Or will you be spinning around in small
regions most of the time and shifting slowly or
seldom? Or, or ?

I think your answer will "depend." Have you seen the
fairly recent postings re large dynamic arrays? Hiding
your data behind an object interface might well be
worth considering, so you can change your mind on the
internal implementation if desirable. Your access to
x,y-indexed info could be like Canvas.Pixels[x,y], and
you could design special methods for whatever...

Just a couple of thoughts...

Regards,
Bengt Richter

Other Threads