Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C++ Libraries / November 2003

Tip: Looking for answers? Try searching our database.

Performance of VC++ Data Structures

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kelvin - 11 Nov 2003 08:16 GMT
to All,

I'm a newbie in VC++, can anyone tell me about the
performance in various Data Structures (eg. Enum, map,
list, vector, hash, arrayList)?

I would like to know performance on CPU and Memory Usage.

eg. Mem usage may involve the mem usage on
creating/deleting an element in the structure.

eg. CPU performance may involve the overhead in iterating
the structure (just estimation will do)

By the way, I'm not very familiar to their
advantages/disadvatntages too, so can anyone also tell me
about it?

Thanks!

from kusanagihk
Andy - 13 Nov 2003 12:29 GMT
I think that you really need to read a book!
If you are new to C++ and do not come from a C background I would strongly
recommend
"Accelerated C++" by Andrew Koenig and Barbara Moo.

As an aside if you are just learning - don't worry about performance.  You
have enough on your plate in learning about C++.
If you focus on clean design and clear code performance *usually* takes care
of itself on modern hardware.
If having done your best shot at good clean design and coding and then find
there is an issue with performance then go back and look at your code and
think about ways of making it better.

Regarding choice of data structure.  (map, list, vector etc).  They have
been designed for slightly different applications.  Whether they perform
well or not depends on how you use them.  For example if you have a
collection that you want to do lots of inserts into the middle then a vector
is probably not going to perform well.  If you need very fast access on a
reasonably static collection then a vector will perform very well indeed.
Before you can make these judgements you need to understand what the various
things were designed for and how they should be applied and the book
mentioned above is an excellent place to start.  After you have read that
you might like to consider Josuttus book "The C++ standard library".
www.josuttis.com

Another resource that you might want to check out is ACCU.  www.accu.org.
They produce two excellent journals that are very accessible to new comers.

HTH

> to All,
>
[quoted text clipped - 17 lines]
>
> from kusanagihk

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.