Solved

stl,map-find,going slow.

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

830 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