From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA05657 for caml-redistribution; Mon, 25 Oct 1999 17:29:00 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA03809 for ; Thu, 21 Oct 1999 21:18:05 +0200 (MET DST) Received: from crufty.research.bell-labs.com (crufty.research.bell-labs.com [204.178.16.49]) by nez-perce.inria.fr (8.8.7/8.8.7) with SMTP id VAA06270 for ; Thu, 21 Oct 1999 21:18:04 +0200 (MET DST) Received: from scummy.research.bell-labs.com ([135.104.2.10]) by crufty; Thu Oct 21 15:17:40 EDT 1999 Received: from blmhsa-pc.research.bell-labs.com ([135.104.27.223]) by scummy; Thu Oct 21 15:17:41 EDT 1999 Received: from research.bell-labs.com (IDENT:salex@localhost [127.0.0.1]) by blmhsa-pc.research.bell-labs.com (8.9.3/8.9.3) with ESMTP id PAA19324 for ; Thu, 21 Oct 1999 15:17:41 -0400 Sender: weis Message-ID: <380F66D5.B2863E5B@research.bell-labs.com> Date: Thu, 21 Oct 1999 15:17:41 -0400 From: Scott Alexander Organization: Bell Laboratories, Lucent Technologies X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.3.19 i686) X-Accept-Language: en MIME-Version: 1.0 To: "'caml-list@inria.fr'" Subject: Re: 32 bit integers References: <19991021162400.01237@pauillac.inria.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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