Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-21-2013, 02:34 PM   #1
LQ Newbie
Registered: Dec 2013
Posts: 1

Rep: Reputation: Disabled
hsearch key strings

OK...found my hsearch bug, works find now, but its not very fast for large tables.
Does anyone know best hashing routine that re-organizes table for speed?

Last edited by rslippert; 12-22-2013 at 09:51 AM. Reason: found my hsearch bug
Old 12-23-2013, 10:25 AM   #2
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,711

Rep: Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279
All depends on the problem. Hash tables are fast... until they pass about 80% as adding new entries causes a lot of collisions - which in turn requires linear insertion afterwards.

It slows down searches due to the linear search on the collisions. Is your hash table large enough for data?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
BASH: replace strings in on file by the strings in another one cristalp Programming 5 10-28-2011 10:47 AM
Search using hsearch() Linux shoaibjameel123 Programming 1 02-01-2011 07:00 AM
[SOLVED] Searching and replacing strings in a file with strings in other files xndd Linux - Newbie 16 07-29-2010 03:40 PM
how to find duplicate strings in vertical column of strings markhod Programming 7 11-02-2005 05:04 AM
libc hcreate and hsearch. ajpug Programming 1 06-03-2005 05:55 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration