caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Pal-Kristian Engstad <mrengstad@yahoo.com>
To: Travis Bemann <bemann@execpc.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Caml productivity.
Date: Wed, 24 Jul 2002 02:45:34 -0700 (PDT)	[thread overview]
Message-ID: <20020724094534.37196.qmail@web13303.mail.yahoo.com> (raw)
In-Reply-To: <20020723232036.A663@execpc.com>

I agree that the C interface is pretty nice. However,
how do would you use SIMD math instructions on the
x86? Would you always call C-routines just to make use
of SIMD or multimedia-instructions? What is the
overhead for calling a function that is executing a
few assembly instructions? Is it even possible to
create a solid division line between "low-level" and
"high-level" code? 

There's something to be said for premature
optimizations, but don't you think there's something
to be gained from having inline assembly in O'Caml? In
C++, one can create inline SIMD floating point vector
operations. A.I. and behaviour code constantly use 3D
math that would benefit from inline assembly.

PKE.

--- Travis Bemann <bemann@execpc.com> wrote:
> On Mon, Jul 22, 2002 at 10:46:35AM -0700,
> Pal-Kristian Engstad wrote:
> > Hi,
> > 
> > Nicolas Cannasse seems to believe that
> "productivity"
> > and "performance" are orthogonal concepts. They
> are
> > not always. For some tasks the performance of the
> > algorithm determins if the program can be put into
> the
> > application. Hence, if the program executes too
> > slowly, the program is useless and the time spent
> on
> > it was a waste. In other words, there was no
> > productivity at all.
> > 
> > I commend Nicolas for trying to use O'Caml in a
> games
> > setting. We, however, can not afford this -
> instead
> > the company designed and implemented a specific
> > language in order to be able to optimize _and_ be
> > productive. This language has high-level
> constructs as
> > well as low-level constructs --- and they can be
> > freely mixed.
> 
> Actually, speed-wise natively compiled OCaml (on at
> least x86; I
> haven't seen benches for other architectures) is
> slightly faster than
> C++ compiled by gcc 3.0, and slightly slower than C
> compiled by gcc
> 3.0.  OCaml does have an excellent C binding
> facility, which makes it
> easy to interface between OCaml and C code (so
> therefore one can use C
> for extremely speed-critical code while writing most
> other code in
> OCaml).  Thus, I see little advantage to writing a
> whole new natively
> compiled language (which would require writing a
> whole new code
> generation and optimization layer, which would be
> extremely
> time-intensive, unless such a language were
> "compiled to C" as things
> such as GCL (GNU Common Lisp) do) rather than simply
> using OCaml with
> speed-critical or otherwise extremely low-level code
> in C.
> 
> -- 
> Yes, I know my enemies.
> They're the teachers who tell me to fight me.
> Compromise, conformity, assimilation, submission,
> ignorance,
> hypocrisy, brutality, the elite.
> All of which are American dreams.
> 
>               - Rage Against The Machine

> ATTACHMENT part 2 application/pgp-signature 



__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.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-07-26 21:07 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-15 21:22 Pal-Kristian Engstad
2002-07-20 15:16 ` William Chesters
2002-07-22 18:22   ` Pal-Kristian Engstad
2002-07-22 18:41     ` achrist
2002-07-22 19:23       ` Pal-Kristian Engstad
2002-07-22 21:13         ` [Caml-list] CamlIDL and function pointers Michael Tucker
2002-07-23  8:39           ` Xavier Leroy
2002-07-23 13:11             ` Dmitry Bely
2002-07-24 15:00             ` Michael Tucker
2002-07-25  9:36               ` Xavier Leroy
2002-07-22 21:26     ` Games (Re: [Caml-list] Caml productivity.) Oleg
2002-07-23  2:56       ` Issac Trotts
2002-07-23 11:03         ` eijiro_sumii
2002-07-23 16:17           ` Charles Martin
2002-07-29  3:36           ` Andrei de A. Formiga
2002-07-29  6:32             ` Florian Hars
2002-07-29 10:23             ` eijiro_sumii
     [not found]               ` <001901c237a7$9e685920$890bfea9@mimbi>
2002-07-30  4:52                 ` eijiro_sumii
2002-07-30 18:13                   ` Jonathan Coupe
2002-07-30  6:16                     ` eijiro_sumii
2002-08-01 15:39                     ` John Max Skaller
2002-08-01 15:59                       ` Markus Mottl
2002-08-01 16:28                       ` Jonathan Coupe
     [not found]                         ` <86vg6ta9o6.fsf@laurelin.dementia.org>
2002-08-02 12:50                           ` Jonathan Coupe
2002-08-02 14:51                         ` John Max Skaller
2002-07-25  3:19       ` Chris Hecker
2002-07-28 13:45         ` Jonathan Coupe
2002-07-29  0:57           ` Michael Vanier
2002-07-22 22:00     ` [Caml-list] Caml productivity Alexander V.Voinov
2002-07-20 15:25 ` Oleg
2002-07-22  6:41 ` Tom
2002-07-22 10:46 ` Nicolas Cannasse
2002-07-22 17:46   ` Pal-Kristian Engstad
2002-07-24  3:20     ` Travis Bemann
2002-07-24  9:45       ` Pal-Kristian Engstad [this message]
2002-07-26 21:42         ` Chris Hecker
2002-07-27  4:41           ` Issac Trotts
2002-07-27  5:49             ` Chris Hecker
2002-07-27 14:49               ` John Max Skaller
2002-07-27  9:06           ` Oleg
2002-07-27 18:18             ` Chris Hecker
2002-07-29  8:13         ` Nicolas Cannasse
2002-07-30  4:46           ` Travis Bemann
2002-07-24  8:02     ` Nicolas Cannasse
2002-07-24  8:25       ` Jérôme Marant
2002-07-24 10:00       ` Pal-Kristian Engstad
2002-07-27  9:06         ` Oleg
2002-07-23  2:08 Arturo Borquez

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=20020724094534.37196.qmail@web13303.mail.yahoo.com \
    --to=mrengstad@yahoo.com \
    --cc=bemann@execpc.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).