By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,099 Members | 2,144 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,099 IT Pros & Developers. It's quick & easy.

fastest data structue

P: n/a
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]
Nov 16 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
You should consider how you want to access the elements first. Is there any
order or relation between the elements?

"Loui Mercieca" <lo**@gfi.com> wrote in message
news:Ov**************@TK2MSFTNGP15.phx.gbl...
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

Nov 16 '05 #2

P: n/a
First In First Out queue..

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

"Joep" <St***@DeStoep.nl> wrote in message
news:41***********************@news.xs4all.nl...
You should consider how you want to access the elements first. Is there
any order or relation between the elements?

"Loui Mercieca" <lo**@gfi.com> wrote in message
news:Ov**************@TK2MSFTNGP15.phx.gbl...
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


Nov 16 '05 #3

P: n/a
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" <lo**@gfi.com> wrote in message
news:u3**************@TK2MSFTNGP15.phx.gbl...
First In First Out queue..

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

"Joep" <St***@DeStoep.nl> wrote in message
news:41***********************@news.xs4all.nl...
You should consider how you want to access the elements first. Is there
any order or relation between the elements?

"Loui Mercieca" <lo**@gfi.com> wrote in message
news:Ov**************@TK2MSFTNGP15.phx.gbl...
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



Nov 16 '05 #4

P: n/a
Joep <St***@DeStoep.nl> wrote:
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).

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #5

P: n/a
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" <St***@DeStoep.nl> wrote in message
news:41***********************@news.xs4all.nl...
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" <lo**@gfi.com> wrote in message
news:u3**************@TK2MSFTNGP15.phx.gbl...
First In First Out queue..

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

"Joep" <St***@DeStoep.nl> wrote in message
news:41***********************@news.xs4all.nl...
You should consider how you want to access the elements first. Is there
any order or relation between the elements?

"Loui Mercieca" <lo**@gfi.com> wrote in message
news:Ov**************@TK2MSFTNGP15.phx.gbl...
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



Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.