Hi,
Currently we are using a CDwordArray type array to store some
DWORD data. This data is dynamic and we need to continuously grow
the array size using SetAtGrow() . Due to performance reasons, we
are planning to try out other possible choices (Cmap,Clist,STL .....).
We want to use the Container that has
the best performance in terms of insertion & random access. We
would like to know the STL Container Class that would suit this
scenario.
thanks & regards,
Sumanth 2 1668
pc wrote: Hi, Currently we are using a CDwordArray type array to store some DWORD data. This data is dynamic and we need to continuously grow the array size using SetAtGrow() . Due to performance reasons, we are planning to try out other possible choices (Cmap,Clist,STL .....). We want to use the Container that has the best performance in terms of insertion & random access. We would like to know the STL Container Class that would suit this scenario.
The STL replacement for MFCs CxxxArray is called std::vector.
It provides very similar functionality.
--
Karl Heinz Buchegger kb******@gascad .at
"Karl Heinz Buchegger" <kb******@gasca d.at> wrote in message
news:42******** *******@gascad. at... pc wrote: Hi, Currently we are using a CDwordArray type array to store some DWORD data. This data is dynamic and we need to continuously grow the array size using SetAtGrow() . Due to performance reasons, we are planning to try out other possible choices (Cmap,Clist,STL .....). We want to use the Container that has the best performance in terms of insertion & random access. We would like to know the STL Container Class that would suit this scenario.
The STL replacement for MFCs CxxxArray is called std::vector. It provides very similar functionality.
If you want good performance for both insertion and random access then
consider using a hashtable, they have a little overhead in generating a hash
code but otherwise have very good performance for random access and
insertion. The only other stipulation is that the generated hashcodes must
be unique.
Allan This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michael Klatt |
last post by:
I need to design a container similar to a std::set, but where the
stored objects may be modified via a non-const iterator. In some
cases the modification will effect the sort order.
Here's an example:
class Object { // an object from the database };
class Sorter { // functor that determines sort order for Objects };
|
by: William Payne |
last post by:
Hello, have you seen a recent files menu in a GUI application? In many GUI
applications there's a menu the displays the most recent files that has been
opened by the program. Say such a menu has four entries and the most recent
file is displayed on top and the oldest at the bottom. New entries are added
at the top, pushing the oldest of the list. I wrote a class which I've named
CircularContainer (please help me think of a better name!)...
|
by: Jackson Yap |
last post by:
can someone kind enough to help me look at the attached html and js
file? Why is it that the javascript menu could not work at
www.apchosting.net but could work at
http://home.pacific.net.sg/~jacksony ? (the drop down bar could not work
at www.apchosting.net but can drop at home.pacific.net.sg. I suspect it
is a server problem but was told it is not possible, therefore assuming
it is a client script problem? the script works last time...
|
by: Darren Smith |
last post by:
Hi There,
I have a shopping cart app that displays products along with a textbox
(to enter quantity) and an image button to add the item to the
shopping cart. Please explain why my below Button_Click procedure
does not retrieve the value of the textbox where the button was
clicked.
Thanks in Advance,
|
by: Prasad |
last post by:
Hi,
What are the different considerations/guidelines in chosing raw device
or file containers for DMS tablespaces?
A link would be very helpful.
Thanks,
Prasad.
| |
by: Doogie |
last post by:
Hi, I have been trying to get a checkbox added to a repeater control
of mine and then try to access events of the repeater control when a
user clicks the checkbox. At first, since the control is tied to xsl,
I added the checkbox there. That works fine, but I cannot get any
information about the checkbox (i.e. checked, unchecked, etc) when I
pass data from the xsl over to a method in java. I can get info on
the other columns but not...
|
by: StephQ |
last post by:
I need to implement an algorithm that takes as input a container and
write some output in another container.
The containers involved are usually vectors, but I would like not to
rule out the possibility of using lists.
The problem is that I need two versions of it, depending if I'm adding
the generated (by the algorithm) values to the target container or if
I just modify pre-existing values of the target container.
Efficiency is important...
|
by: helpwithcode |
last post by:
Hi people,
I am just learning java.I have been creating a project which involves JDBC Connectivity.I find that the statements,
String string_dob=text_dob.getText();
//Converting string to date
System.out.println(string_dob);
s.Info_DOB=Date.valueOf(string_dob);
runs perfectly fine in the method insert() and throws up an illegal Exception in the method UPDATE.This is the error I get when I pass a date "1979-05-02"
|
by: d.s. |
last post by:
I've got an app with two classes, and one class (InventoryInfoClass)
is an object within the other class (InventoryItem). I'm running into
problems with trying to access (get/set) a private variable within the
included class (InventoryInfo) from the "including" class
(InventoryItem).
Here's the code, trimmed down. I've included ********* at the start
of the first line that's blowing up on me. I'm sure others that try
to access the...
|
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...
|
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,...
| |
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...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |