Solved

stl,map-find,going slow.

Posted on 2003-10-24
3
531 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

746 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

12 Experts available now in Live!

Get 1:1 Help Now