From owner-freebsd-arch@FreeBSD.ORG Fri Feb 28 11:43:07 2014 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9999DEF1 for ; Fri, 28 Feb 2014 11:43:07 +0000 (UTC) Received: from vps.rulingia.com (vps.rulingia.com [103.243.244.15]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 06EC41239 for ; Fri, 28 Feb 2014 11:43:06 +0000 (UTC) Received: from server.rulingia.com (c220-239-232-212.belrs5.nsw.optusnet.com.au [220.239.232.212]) by vps.rulingia.com (8.14.7/8.14.7) with ESMTP id s1SBgUkY002985 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 28 Feb 2014 22:42:30 +1100 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.7/8.14.7) with ESMTP id s1SBgOC9039152 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 28 Feb 2014 22:42:24 +1100 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.7/8.14.7/Submit) id s1SBgOJ3039151 for arch@FreeBSD.org; Fri, 28 Feb 2014 22:42:24 +1100 (EST) (envelope-from peter) Date: Fri, 28 Feb 2014 22:42:24 +1100 From: Peter Jeremy To: arch@FreeBSD.org Subject: Re: small kernel kernel option... Message-ID: <20140228114224.GE2705@server.rulingia.com> References: <20140226214816.GB92037@funkthat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="q9KOos5vDmpwPx9o" Content-Disposition: inline In-Reply-To: <20140226214816.GB92037@funkthat.com> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.22 (2013-10-16) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Feb 2014 11:43:07 -0000 --q9KOos5vDmpwPx9o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2014-Feb-26 13:48:16 -0800, John-Mark Gurney wrote: >I'm about to commit a change to sha256 to speed it up, but the cost >of that speed up is an increase in code/data size from just under 1k >to almost 9k (as measured on amd64)... this increase is from unrolling >a loop.. Out of interest, how much of a speedup and what CPU/compiler combinations did you test your change on? I ask because several years ago, I tried about 7 different SHA-256 implementations (basically, all the C ones I could easily find in FreeBSD and ports I had installed, as well as one I tweaked myself) across a range of CPUs and compilers. I found that not only was there a very wide variation in speed between implementations but that the best on one CPU often ran quite poorly on another and unrolling loops didn't necessarily help. --=20 Peter Jeremy --q9KOos5vDmpwPx9o Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iKYEARECAGYFAlMQdiBfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl bnBncC5maWZ0aGhvcnNlbWFuLm5ldDBCRjc3QTcyNTg5NEVCRTY0RjREN0VFRUZF OEE0N0JGRjAwRkI4ODcACgkQ/opHv/APuIfJAgCcCDPc8M7zXY+CXQP2RLcPgA2/ I+sAoIKZYCrb1xoKofOPwniloOR7yofx =WjFN -----END PGP SIGNATURE----- --q9KOos5vDmpwPx9o--