Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Feb 2014 22:42:24 +1100
From:      Peter Jeremy <peter@rulingia.com>
To:        arch@FreeBSD.org
Subject:   Re: small kernel kernel option...
Message-ID:  <20140228114224.GE2705@server.rulingia.com>
In-Reply-To: <20140226214816.GB92037@funkthat.com>
References:  <20140226214816.GB92037@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <jmg@funkthat.com> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140228114224.GE2705>