This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/6966] hsearch almost always probes the same index when using the secondary hash


------- Additional Comments From bugzilla at bsb dot me dot uk  2008-10-19 01:33 -------
Created an attachment (id=3006)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3006&action=view)
Suggested fix.

The patch suggests two related changes.  First, that idx be set from hval
without reducing havl % htab->size.  hval2 can now be derived from hval without
generating the same probe sequence all the time.  Secondly, a new variable must
be used to detect the wrap-around, since hval no longer contains the initial
value of idx.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6966

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]