Solved

stl,map-find,going slow.

Posted on 2003-10-24
3
533 Views
Last Modified: 2007-12-19
i am using stl hash_map  to store 2 strings,first the map is empty,then i need to chek if the first string is on the map,if i find i need to take the second one and process,else i need to do some processing and find the second string and insert into map,
my problem is the find going slow when data is increzed ,it is realy going so so slow,
any other way to do the same thinks?any other methods to improve the speed,
any other altarnative to maps?to increze speed?i just want to do the same thinks
thanks







 
0
Comment
Question by:hirosh
3 Comments
 
LVL 5

Accepted Solution

by:
mtmike earned 125 total points
ID: 9614044
Hash maps are usually the fastest way to do associative lookups unless you're using an unsuitable hash function. Try using a normal map instead of a hash_map and see if performance improves. If it does, the hash function is likely to be the problem.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

930 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now