[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

What is the best structure for a data object?

Posted on 1997-07-05
4
Medium Priority
?
272 Views
Last Modified: 2010-04-12
Brick layers know a lot about reasonable structures for bricks and the people at GM understand that wheels should be round, but information technologists seem helpless to tell how data objects are best structured. What is the best structure or structures and why? Who are the best experts on this question?
0
Comment
Question by:eslowry
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Expert Comment

by:MarkC
ID: 1010515
How long is a piece of string?Seriously, you need to know a few things about not only the data but (i) the platform and the application.
0
 
LVL 1

Expert Comment

by:byoung
ID: 1010516
I don't recall ever being "helpless" telling how data structures are best structured because, well, MarkC hit it on the nose, unless you have special powers of programming, or a whole bunch of knowledge about your needs and uses of the data object, you won't be able to tell what to use.
      In fact, using your analogies, the reason we know how to make bricks is because we know what they are needed for, the strength they must have, shape that most optimally fits the need, and a little cosmetic beauty they should posses.  Hence we came up with the modern brick.
      The wheel was probably discovered by trial and error and need.  The people had a need to roll something instead of carrying it(less energy), thus they figured out the circular shape.  The 'people at GM' now know that certain types of rubber, mixed with other elements makes a strong, resistable to heat, surface that grips the road well.  Having treads helps with water, or other surfaces.  Making the wheels hollow and pushing pounds of pressure into them helps smooth the ride....and so on.
      So you see, you must know ALOT before you can decide on anything being 'Best", because quite simply, nothing is 'Best' always.
0
 
LVL 1

Accepted Solution

by:
8051 earned 200 total points
ID: 1010517
There are two classes of structures:
uninterrupted and interrupted.

Uninterrupted are standard types (char, int, long),
arrays ( unsigned char x[10]) and structures (struct
{...}). All this types takes uninterrupted pool of
memory. This variant always can be processed faster,
with compact code and more secure.

The 'struct' definition is only LOGIC construction, help
you to handle elements offsets and types in array. Instead  
of this you can use indexes and type conversions and good compiler will generate the *same* code.

The best variable type is processor-depended. On 8-bit
processors it is a byte, on 16-bit - int, 32, 64...

Interrupted structures are lists, chains, trees and all
others takes separated memory pool for each element.
It is more complicated structures, you have to spend
more resources to handle it. If it is frequently accessible
data, try to implement it as an array or structure.

This is in general. It is true for all CPU and MPU I know.
For more detailed answer, please send more detailed question.


0
 

Author Comment

by:eslowry
ID: 1010518
This response and the other comments are helpful mainly in confirming for me the poor state of understanding that exists on the issue of what data object structures are reasonable. Thanks.
0

Featured Post

Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your iMac really need a hardware upgrade? Will upgrading RAM speed-up your computer? If yes, then how can you proceed? Upgrading RAM in your iMac is not as simple as it may seem. This article will help you in getting and installing right RA…
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question