caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: malc <malc@pulsesoft.com>
To: Xavier Leroy <xavier.leroy@inria.fr>
Cc: William Chesters <williamc@paneris.org>, <caml-list@inria.fr>
Subject: Re: float array alignment; was Re: [Caml-list] Bigarray access speed
Date: Mon, 19 Aug 2002 17:07:33 +0400 (MSD)	[thread overview]
Message-ID: <Pine.LNX.4.44.0208191704170.1584-100000@home.oyster.ru> (raw)
In-Reply-To: <20020819145605.A6276@pauillac.inria.fr>

On Mon, 19 Aug 2002, Xavier Leroy wrote:

> malc writes:
> > To get maximal speed of the inner loops data needs to be naturally 
> > aligned. OCaml does nothing to enforce it for non-big arrays. Bigarrays on 
> > the other hand are mmaped(4k on IA32) and you get perfectly aligned data 
> > for free. I was thinking that maybe Array can be extended with
> > make[create]_aligned, for speed/space tradeoff.
> 
> As William Chester said, allocating 8-aligned arrays isn't really
> hard, but keeping them 8-aligned across copying collection,
> compaction, and structured I/O is quite a pain.
> 
> My experiments indicate that the lack of alignment on float arrays 
> (or more precisely the fact that they are 4-aligned instead of
> 8-aligned) has negligible impact on performance for the IA32 (Pentium)
> and PowerPC processors, but non-negligible for SPARC and MIPS.
> And of course on a 64-bit architecture the problem goes away because
> everything in the Caml heap is then 8-aligned.  Since I expect IA32
> and PowerPC to remain dominant until we massively switch to 64-bit
> processors, there's no urgent need to do something about float array
> alignment.

IA32 is now much bigger family, and unlucky owners of AMD 7th generation 
machines, such as myself, do pay a price for unaligned double precission
float accesses. 

-- 
mailto:malc@pulsesoft.com

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2002-08-19 13:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-15 22:50 Richard Nyberg
2002-08-16 10:27 ` malc
2002-08-16 10:40   ` Markus Mottl
2002-08-16 11:08   ` float array alignment; was " William Chesters
2002-08-19 12:56     ` Xavier Leroy
2002-08-19 13:07       ` malc [this message]
2002-08-16 18:46   ` Richard Nyberg

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=Pine.LNX.4.44.0208191704170.1584-100000@home.oyster.ru \
    --to=malc@pulsesoft.com \
    --cc=caml-list@inria.fr \
    --cc=williamc@paneris.org \
    --cc=xavier.leroy@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).