caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Scott Alexander <salex@research.bell-labs.com>
To: "'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: Re: 32 bit integers
Date: Thu, 21 Oct 1999 15:17:41 -0400	[thread overview]
Message-ID: <380F66D5.B2863E5B@research.bell-labs.com> (raw)
In-Reply-To: <19991021162400.01237@pauillac.inria.fr>

Unfortunately, the Int32 library can have bad performance implications.  When
we implemented SHA-1 (which pretty much assumes 32 bit ints), we originally
used Int32 because we wanted to have portability with either Alphas or
Pentiums.  Unfortunately, the performance was unacceptable.  For byte code,
using Int32, to SHA-1 4MB of data takes 86.4s on an Alpha whereas using (63
bit) ints on an Alpha takes only 36.0s.  (Using native code, the numbers are
62.0s versus 2.5s.)  Fortunately for us, we didn't care about the memory
overhead.

My guess was that much of this overhead is due to the fact that ints are
supported directly by the byte code interpreter rather than requiring a call
to a function.  Similarly, I'm guessing that the native code compiler is
using the add instruction instead of arranging a function call.

In any case, while the Int32 package did give us some way of coping with
Pentiums, it wasn't a full solution.

Scott




  reply	other threads:[~1999-10-25 15:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-18 14:47 Edwin Young
1999-10-21 14:24 ` Xavier Leroy
1999-10-21 19:17   ` Scott Alexander [this message]
1999-10-22  0:00   ` John Prevost
1999-10-22  9:42     ` Xavier Leroy
1999-10-21 18:13 Manuel Fahndrich
1999-10-29 21:28 Juergen Pfitzenmaier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=380F66D5.B2863E5B@research.bell-labs.com \
    --to=salex@research.bell-labs.com \
    --cc=caml-list@inria.fr \
    /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.
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 NNTP newsgroup(s).