caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: artboreb@netscape.net (Arturo Borquez)
To: engstad@naughtydog.com ("Pal-Kristian Engstad")
Cc: caml-list@inria.fr
Subject: RE: [Caml-list] Caml productivity.
Date: Mon, 22 Jul 2002 22:08:34 -0400	[thread overview]
Message-ID: <2BCE32EB.10F639F9.00958B05@netscape.net> (raw)

"Pal-Kristian Engstad" <engstad@naughtydog.com> wrote:

>I am also quite surprised by ocaml's speed. It's doing quite well on a lot
>of platforms. And I would concur that it does quite well when compared to C
>and Fortran. However, that is not quite enough. For me, it isn't enough that
>the compiler is doing a decent job. I want to have the capability to make
>the code even better. To do that, one needs to be able to make use of the
>hardware, i.e. get down to the bare bones of your platform. Yes, it will
>mean that you are giving up portability. Yes, it might be "unsafe", but then
>again, why are there unsafe set and get operations for arrays in ocaml?
> ....

OCaml not too bad?
If you want more I suggest to compile with ocamlopt with the switch -S
(keep intermediate assembly source output) and take a look. Maybe you'll
find the way to strip out some cpu cycles, or maybe you have a better
'faster' GC system. 

>Imagine that there is a special LZWC instruction that counts the number of
>leading zeroes in a 64-bit word. I would love to be able to write >something
>like:
>
>let lzc (x:int64) = inline
>regs res : int32 of  (** Work registers **)
>lzwc res, x (** Opcodes sent to the assembler **)
>return res              (** result of the computation **)

>let main =
>   Printf.printf "lzc %d = %d\n" 12 (lzc 12)
>

You can do such thing in OCaml calling a 'C' function, I don't see
where is the problem, even more inside 'C' functions you can code
inline assembler. So you can build your own critical time massive
cpu crunching code that way and use OCaml on the top (where C is bad)

-- 
Arturo Borquez



__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.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-23  2:08 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-23  2:08 Arturo Borquez [this message]
  -- strict thread matches above, loose matches on Subject: below --
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 22:00     ` 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
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

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=2BCE32EB.10F639F9.00958B05@netscape.net \
    --to=artboreb@netscape.net \
    --cc=caml-list@inria.fr \
    --cc=engstad@naughtydog.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;
as well as URLs for NNTP newsgroup(s).