LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-21-2013, 01:34 PM   #1
rslippert
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 08:51 AM. Reason: found my hsearch bug
 
Old 12-23-2013, 09:25 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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?
 
  


Reply



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 09:47 AM
Search using hsearch() Linux shoaibjameel123 Programming 1 02-01-2011 06:00 AM
[SOLVED] Searching and replacing strings in a file with strings in other files xndd Linux - Newbie 16 07-29-2010 02:40 PM
how to find duplicate strings in vertical column of strings markhod Programming 7 11-02-2005 04:04 AM
libc hcreate and hsearch. ajpug Programming 1 06-03-2005 04:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:56 PM.

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