473,885 Members | 2,431 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

fastest data structue

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
5 2634
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******** ******@TK2MSFTN GP15.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
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******** ******@TK2MSFTN GP15.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
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******** ******@TK2MSFTN GP15.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******** ******@TK2MSFTN GP15.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
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.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #5
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******** ******@TK2MSFTN GP15.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******** ******@TK2MSFTN GP15.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
32704
by: Rune Strand | last post by:
Hi, If I have a lot of integers and want do something with each digit as integer, what is the fastest way to get there? Eg. Make 12345 into an iterable object, like or "12345" (Btw: What is the English term for this process; itemize? tokenize? digitize? sequence?) Some examples:
6
4900
by: Neal D. Becker | last post by:
I need a fairly small lookup table, and I'm wondering which data python data structure would be fastest. I could use a list, tuple, dictionary, numeric array, or maybe plain python array. The table would be indexed by simple integers and would be dense (filled).
11
408
by: DraguVaso | last post by:
Hi, I should use XML to synchronize the data from different (VB.NET) applications, and I was just wondering which Overloads of these functions ( ReadXmlSchema, ReadXml and WriteXml) goes the fastest? I don't think the ReadXMLSchema would give a lot of difference, but maybe the overlaods of ReadXml and WriteXml will. Especially with larges files/datatables... Should I use the IO.Stream? The XmlReader/XmlWriter?
2
6477
by: yee young han | last post by:
I need a fast data structure and algorithm like below condition. (1) this data structure contain only 10,000 data entry. (2) data structure's one entry is like below typedef struct _DataEntry_ { char szInput; char szOutput; int iSum;
0
1221
by: Duncan | last post by:
It is on WINCE. But should not matter. I am binding a datagrid to a ArrayList using the datasource property of the datagrid. ArrayList will contain data structures. The data structure contains all the fields of a specific result set. The user has the option to select the fields he/she wants. So the structue that is contained in the ArrayList will change on the Fly. I am not sure how to tackle this problem. Does anyone know how to...
60
49244
by: Julie | last post by:
What is the *fastest* way in .NET to search large on-disk text files (100+ MB) for a given string. The files are unindexed and unsorted, and for the purposes of my immediate requirements, can't be indexed/sorted. I don't want to load the entire file into physical memory, memory-mapped files are ok (and preferred). Speed/performance is a requirement -- the target is to locate the string in 10 seconds or less for a 100 MB file. The...
0
1772
by: Chris | last post by:
I finally got my report to be recongized, that login issue is terrible. Using VS.NET 2003, created report inside of it. Now when I attempt to display the report is blank (missing data, though I can see the viewer, report fields, etc.) I've tried setting the rpt.SetDataSource(dstConcernInfo) in the reports VB code behind and my viewer code-behind page. No luck. I've displayed my dataset to see that it's full. I assume that the report can't...
3
1799
by: Harry Haller | last post by:
What is the fastest way to search a client-side database? I have about 60-65 kb of data downloaded to the client which is present in 3 dynamically created list boxes. The boxes are filled from 3 string arrays, which are just lists of people or companies in alphabetic order. These names may have accented and umlauted characters (which are present as the plain ASCII - not as the entity &# character). The page is UTF-8 encoded. e.g. ...
1
2443
by: Harry Haller | last post by:
What is the fastest way to search a client-side database? I have about 60-65 kb of data downloaded to the client which is present in 3 dynamically created list boxes. The boxes are filled from 3 string arrays, which are just lists of people or companies in alphabetic order. These names may have accented and umlauted characters (which are present as the plain ASCII - not as the entity &# character). The page is UTF-8 encoded. e.g. ...
0
9956
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9799
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11172
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10770
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10871
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6010
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4627
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4235
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.