From owner-freebsd-chat@FreeBSD.ORG Thu Jul 15 22:44:08 2010 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC9061065673 for ; Thu, 15 Jul 2010 22:44:08 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 95E568FC13 for ; Thu, 15 Jul 2010 22:44:08 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 3E216A5FBEE; Fri, 16 Jul 2010 06:44:07 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id 2Xit1TIH4qKJ; Fri, 16 Jul 2010 06:44:01 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id CB89AA5F9E6; Fri, 16 Jul 2010 06:44:00 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=Goaba4EpV6tltnDqaxR9LEFfYeLeHrtPjRKAgDPmonp8wDhUJ0QN9mBVOoC0zIPB7 a9Z7eFLTipZxT9/bKjVrA== Message-ID: <4C3F8F2E.9080705@delphij.net> Date: Thu, 15 Jul 2010 15:43:58 -0700 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.10) Gecko/20100629 Thunderbird/3.0.5 ThunderBrowse/3.3 MIME-Version: 1.0 To: "deeptech71@gmail.com" References: In-Reply-To: X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-chat@freebsd.org Subject: Re: is strlen()'s read-4-bytes-ahead a standard? X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 22:44:09 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2010/07/15 15:38, deeptech71@gmail.com wrote: > Some C implementations use the read-4-bytes-ahead technique to speed > up strlen(). Does the C standard state anything about strlen() being > allowed to read past the terminating zero? It's not 4-bytes-ahead, but read a whole (aligned) word at one time. I think C standard does not dictate in this detail. But why? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iQEcBAEBCAAGBQJMP48tAAoJEATO+BI/yjfBBNwIAJrqtefoZJ90095Aurk5H9kv SQZ8wVO1vgFu4qN2yT8InuXtpCB9Q6onuFQmMphdQrbqJWIDb+lxCD8UZUp6ocZE 544RPI9kLwWfUwQ0WdrTNmdAHGIbqc6nrhlS3IwTn82NCjuFH5pEpUmt0r53b19I jy/FlJjjTSiSC32tODLa922mo1GB50CA3fFlgUVlB7PHLRvdLeE6JsmvRA89gfRi /TOIRP8X/tJeDE4yuDycRmMCvOI+hFHdFchMxYQG2bifo1aZQzny+iNRA0xvYpO7 oZble3Cgwfs+jj2RkGW/syOXtvYA1CTxAJ67vf4OCX5Facq+Yfi3pto7xbIJCKE= =rxAG -----END PGP SIGNATURE-----