From: Paul Mackerras <paulus@samba.org>
To: linux@horizon.com
Cc: git@vger.kernel.org
Subject: Re: Revised PPC assembly implementation
Date: Mon, 25 Apr 2005 19:40:19 +1000 [thread overview]
Message-ID: <17004.47876.414.756912@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <20050425031337.16605.qmail@science.horizon.com>
linux@horizon.com writes:
> Three changes:
> - Added stack frame as per your description.
> - Found two bugs. (Cutting & pasting too fast.) Fixed.
> - Minor scheduling improvements. More to come.
>
> Which lead to three questions:
> - Is the stack set properly now?
Not quite; you are saving 20 registers, so you need a 96-byte stack
frame, like this:
stwu %r1,-96(%r1)
stmw %r13,16(%r1)
...
lmw %r13,16(%r1)
addi %r1,%r1,96
blr
Since sha1_core is a leaf function, I suppose you could use the lr
save area (do stwu %r1,-80(%r1); stmw %r13,0(%r1)) but it seems a bit
dodgy.
> - Does it produce the right answer now?
Yes.
> - Is it any faster?
I did 10 repetitions of my program that calls SHA1_Update with a
4096-byte block of zeroes 256,000 times. With my version, the average
time was 4.6191 seconds with a standard deviation of 0.0157. With your
version, the average was 4.6063 and the standard deviation 0.0148. So
I would say that your version is probably just a little faster - of the
order of 0.3% faster.
Paul.
next prev parent reply other threads:[~2005-04-25 9:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-23 12:42 [PATCH] PPC assembly implementation of SHA1 linux
2005-04-23 13:03 ` linux
2005-04-24 2:49 ` Benjamin Herrenschmidt
2005-04-24 4:40 ` Paul Mackerras
2005-04-24 12:04 ` Wayne Scott
2005-04-25 0:16 ` linux
2005-04-25 3:13 ` Revised PPC assembly implementation linux
2005-04-25 9:40 ` Paul Mackerras [this message]
2005-04-25 17:34 ` linux
2005-04-25 23:00 ` Paul Mackerras
2005-04-25 23:17 ` David S. Miller
2005-04-26 1:22 ` Paul Mackerras
2005-04-27 1:47 ` linux
2005-04-27 3:39 ` Paul Mackerras
2005-04-27 16:01 ` linux
2005-04-26 2:14 ` linux
2005-04-26 2:35 ` linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17004.47876.414.756912@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=git@vger.kernel.org \
--cc=linux@horizon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).