473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Which container I should choose for better performance?

Hi Friends:

I am managing a large number of objects which has unique id <ULONG64>.
Which container i should choose to perform best find() performance?

Can choose from STL in vc2003 or Boost 1_33. Currently I am using
std::map<>. Your suggestion?

Rgds, David Xiao

Dec 23 '05 #1
3 2010

da******@gmail.com wrote:
Hi Friends:

I am managing a large number of objects which has unique id <ULONG64>.
Which container i should choose to perform best find() performance?

Can choose from STL in vc2003 or Boost 1_33. Currently I am using
std::map<>. Your suggestion?


You are likely to get faster lookup using hash tables rather than
trees. Profile the alternatives to see if that's the case for you.

Also hash tables tend to use less memory than trees.

Dec 23 '05 #2
da******@gmail.com wrote:
Hi Friends:

I am managing a large number of objects which has unique id <ULONG64>.
Which container i should choose to perform best find() performance?

Can choose from STL in vc2003 or Boost 1_33. Currently I am using
std::map<>. Your suggestion?

Rgds, David Xiao


I'd go for a hashed Boost.MultiIndex
(http://www.boost.org/libs/multi_inde...ed_topics.html)

--
Regards,

Ferdi Smit (M.Sc.)
Email: Fe********@cwi.nl
Room: C0.07 Phone: 4229
INS3 Visualization and 3D Interfaces
CWI Amsterdam, The Netherlands
Dec 23 '05 #3
Thanks a lot, folks.

MultiIndex is exactly what I need, it provide every facility i need.
Hopw it have a graceful performance while managing pretty large number
of objects. (around 100,000 -- 1,000,000 records)

Rgds, David

Dec 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number....
6
by: lastusernameleft | last post by:
i've been researching this issue for a while and can't come to any conclusive answer, mostly it seems to be a preference over syntax, some saying c# is elegant while vb is clunky, or that c# is...
5
by: lovecreatesbeauty | last post by:
Hello. I often heard that four C++'s special members: default constructor, destructor, copy constructor & assignment operator should be provided for a class. But in your real C++ project...
65
by: Skybuck Flying | last post by:
Hi, I needed a method to determine if a point was on a line segment in 2D. So I googled for some help and so far I have evaluated two methods. The first method was only a formula, the second...
9
by: Robert Lario | last post by:
C# verses VB.Net Which Way to go. I am sure this issues has come up before. Please direct me to any good articles that cover this issue. Ideally some neutral assessment.
0
by: davihigh | last post by:
Hi Friends: I am managing a large number of objects which has unique id <ULONG64>. Which container i should choose to perform best find() performance? Can choose from STL in vc2003 or Boost...
4
by: Michel Esber | last post by:
Hello, LUW V8 FP 11 running Linux RH AS4 Update 3. In regards to performance and IO parallelism, does it matter if I create a tablespace with a single big container, or is it better to create...
7
by: toton | last post by:
Hi, I want a circular buffer or queue like container (queue with array implementation). Moreover I want random access over the elements. And addition at tail and remove from head need to be low...
20
by: mike3 | last post by:
Hi. (Xposted to both comp.lang.c++ and comp.programming since I've got questions related to both C++ language and general programming) I've got the following C++ code. The first routine runs in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.