From: Ville-Pertti Keinonen <will@exomi.com>
To: "David McClain" <dmcclain1@mindspring.com>
Cc: <caml-list@inria.fr>
Subject: Re: [Caml-list] FP's and HyperThreading Processors
Date: Sat, 14 Jun 2003 09:11:41 +0300 [thread overview]
Message-ID: <10E87304-9E2F-11D7-9895-000393863F70@exomi.com> (raw)
In-Reply-To: <00ad01c331f2$1bbacee0$0201a8c0@dylan>
> P4 linked into the program. On the old P2 system, this code spend
> roughly
> 60% of its time inside that vendor code for FFT's. This is no longer
> true,
> as other tests show very high performance of just those vendor
> routines.
Does calling from OCaml affect the performance of the FFTs?
You presumably use your own C wrappers to access the vendor code from
your OCaml code - do you align the stack?
For floating point intensive code, lack of alignment can cause
significant differences in performance. I remember seeing 40%
differences (worst case) in performance when I ran into this several
years ago, and I don't think the situation has improved with more
recent cpus.
OCaml currently doesn't ensure more than word alignment for stack or
allocations on i386, so you are going to have suboptimal performance
for any floating point code written in OCaml (as well as float arrays
allocated in OCaml but manipulated elsewhere). However, if you're
calling external code (presumably compiled in an alignment-preserving
way), you should at least try ensuring that the stack is aligned to a
64-bit boundary (or 128-bit boundary if SSE is used for anything) in
case that affects performance.
If you're actually making heavy use of hyperthreading, it may make
memory access patterns less uniform and performance highly
unpredictable. Have you tried comparing performance with and without
hyperthreading enabled?
Anyway, it sounds like you might be running into several issues. The
only certain way to find out which are the most significant ones is to
do large amounts of profiling and testing.
-------------------
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
next prev parent reply other threads:[~2003-06-14 6:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-13 6:44 David McClain
2003-06-13 8:06 ` John Max Skaller
2003-06-13 10:03 ` [Caml-list] Type safe affectation ? Christophe Raffalli
2003-06-14 13:35 ` Xavier Leroy
2003-06-15 18:53 ` brogoff
2003-06-15 19:49 ` Brian Hurt
2003-06-16 1:38 ` Jacques Garrigue
2003-06-13 18:38 ` [Caml-list] FP's and HyperThreading Processors Kip Macy
2003-06-13 21:23 ` David McClain
2003-06-13 21:39 ` Kip Macy
2003-06-13 21:56 ` David McClain
2003-06-14 22:08 ` John Max Skaller
2003-06-14 6:11 ` Ville-Pertti Keinonen [this message]
2003-06-13 19:07 ` Xavier Leroy
2003-06-13 21:33 ` Jim Farrand
2003-06-13 21:39 ` David McClain
2003-07-02 10:26 ` David Monniaux
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=10E87304-9E2F-11D7-9895-000393863F70@exomi.com \
--to=will@exomi.com \
--cc=caml-list@inria.fr \
--cc=dmcclain1@mindspring.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox