From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22651 invoked by alias); 21 Sep 2006 04:27:59 -0000 Received: (qmail 22634 invoked by uid 22791); 21 Sep 2006 04:27:58 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 21 Sep 2006 04:27:54 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id C40E4FB23 for ; Thu, 21 Sep 2006 06:27:51 +0200 (CEST) Received: from aj by arthur.inka.de with local (Exim 4.51) id 1GQGA6-0001Ej-ON for libc-hacker@sources.redhat.com; Thu, 21 Sep 2006 06:27:46 +0200 From: Andreas Jaeger To: Glibc hackers Subject: Two bugzilla patches OpenPGP: id=C272A126; url=http://www.suse.de/~aj/keys.txt Date: Thu, 21 Sep 2006 04:27:00 -0000 Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=sha1; protocol="application/pgp-signature" Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00044.txt.bz2 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 2802 Bug 2830: Fix is in http://sourceware.org/ml/libc-alpha/2006-06/msg00010.html Ok to commit? Bug 2510: Patch appended. Ok to commit? Andreas 2006-09-21 Andreas Jaeger [BZ #2510] * manual/search.texi (Hash Search Function): Clarify. (Array Search Function): Clarify. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Index: manual/search.texi --- manual/search.texi 11 Oct 2002 10:50:55 -0000 1.36 +++ manual/search.texi 21 Sep 2006 04:27:21 -0000 @@ -82,7 +82,7 @@ starting at @var{base} if it is found.=20=20 available @code{NULL} is returned. =20 The mean runtime of this function is @code{*@var{nmemb}}/2. This -function should only be used elements often get added to or deleted from +function should only be used if elements often get added to or deleted from the array in which case it might not be useful to sort the array before searching. @end deftypefun @@ -247,21 +247,21 @@ Couldn't find Janice. @node Hash Search Function @section The @code{hsearch} function. =20 -The functions mentioned so far in this chapter are searching in a sorted +The functions mentioned so far in this chapter are for searching in a sort= ed or unsorted array. There are other methods to organize information which later should be searched. The costs of insert, delete and search differ. One possible implementation is using hashing tables. -The following functions are declared in the the header file @file{search.h= }. +The following functions are declared in the header file @file{search.h}. =20 @comment search.h @comment SVID @deftypefun int hcreate (size_t @var{nel}) The @code{hcreate} function creates a hashing table which can contain at least @var{nel} elements. There is no possibility to grow this table so -it is necessary to choose the value for @var{nel} wisely. The used -methods to implement this function might make it necessary to make the +it is necessary to choose the value for @var{nel} wisely. The method +used to implement this function might make it necessary to make the number of elements in the hashing table larger than the expected maximal -number of elements. Hashing tables usually work inefficient if they are +number of elements. Hashing tables usually work inefficiently if they are filled 80% or more. The constant access time guaranteed by hashing can only be achieved if few collisions exist. See Knuth's ``The Art of Computer Programming, Part 3: Searching and Sorting'' for more --=20 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj/ SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GPG fingerprint =3D 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 --=-=-= Content-Type: application/pgp-signature Content-length: 188 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFEhTCOJpWPMJyoSYRAlVuAJ4gxVgk8+um1xvNVHd559X3urdebACfZPle dcupkCMg2nZSZJNHv3H0oEU= =WDCS -----END PGP SIGNATURE----- --=-=-=--