fastest data structue

  • Thread starter Thread starter Loui Mercieca
  • Start date Start date
L

Loui Mercieca

Hi,

In my design i have a data structure used to store large amount of
numbers ( in the range of lots of thousands ). Each element contains 3 items
and the no of elements are dynamic.. of the form:
[X1,Y1,Z1]
[X2,Y2,Z2]
 
You should consider how you want to access the elements first. Is there any
order or relation between the elements?
 
First In First Out queue..

There is no need for sorting or searching or any data manipulation.

Joep said:
You should consider how you want to access the elements first. Is there
any order or relation between the elements?

Loui Mercieca said:
Hi,

In my design i have a data structure used to store large amount of
numbers ( in the range of lots of thousands ). Each element contains 3
items and the no of elements are dynamic.. of the form:
[X1,Y1,Z1]
[X2,Y2,Z2]
.
.
.
[Xn,Yn,Zn]

The topmost priority is time, but memory efficiency is important too..
Can anyone the most suitable way of implementation.

Thanks
 
A queue is what comes up first since that is a fifo collection. Maybe
storing structures instead of objects increases speed a bit. What will you
be doing with the 3D points?

Loui Mercieca said:
First In First Out queue..

There is no need for sorting or searching or any data manipulation.

Joep said:
You should consider how you want to access the elements first. Is there
any order or relation between the elements?

Loui Mercieca said:
Hi,

In my design i have a data structure used to store large amount of
numbers ( in the range of lots of thousands ). Each element contains 3
items and the no of elements are dynamic.. of the form:
[X1,Y1,Z1]
[X2,Y2,Z2]
.
.
.
[Xn,Yn,Zn]

The topmost priority is time, but memory efficiency is important
too.. Can anyone the most suitable way of implementation.

Thanks
 
Joep said:
A queue is what comes up first since that is a fifo collection. Maybe
storing structures instead of objects increases speed a bit.

On the contrary - that would *decrease* performance in the queue (until
2.0 with generics) as it would require boxing and unboxing. Even with
generics, using objects is likely to be faster for putting things into
the queue and removing them, as a reference is smaller than three
integers (or doubles, or whatever).
 
I created a dll, which accepts data from a port ( serial/ parallel/ usb )
and fills this 'array', thus i must ensure that every point is handled and
stored. What i really don't want is that some data on the port is lost due
to storing latency.

However the area to be scanned is quite large ( 500mm/500mm/100mm at a
resolution of 0.02mm ) thus i would like to use memory efficiently

I use this 'array' then to plot these points as a cloud mesh, at a later
time..


Joep said:
A queue is what comes up first since that is a fifo collection. Maybe
storing structures instead of objects increases speed a bit. What will you
be doing with the 3D points?

Loui Mercieca said:
First In First Out queue..

There is no need for sorting or searching or any data manipulation.

Joep said:
You should consider how you want to access the elements first. Is there
any order or relation between the elements?

Hi,

In my design i have a data structure used to store large amount of
numbers ( in the range of lots of thousands ). Each element contains 3
items and the no of elements are dynamic.. of the form:
[X1,Y1,Z1]
[X2,Y2,Z2]
.
.
.
[Xn,Yn,Zn]

The topmost priority is time, but memory efficiency is important
too.. Can anyone the most suitable way of implementation.

Thanks
 
Back
Top