caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Markus Mottl <mottl@miss.wu-wien.ac.at>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Inline assembly?
Date: Fri, 23 Mar 2001 16:59:15 +0100	[thread overview]
Message-ID: <20010323165915.A2990@miss.wu-wien.ac.at> (raw)
In-Reply-To: <20010322142826.B18008@pauillac.inria.fr>; from Xavier.Leroy@inria.fr on Thu, Mar 22, 2001 at 14:28:26 +0100

On Thu, 22 Mar 2001, Xavier Leroy wrote:
> Yes.  Since the C function will not heap-allocate nor raise
> exceptions, you can tell the compiler about it using the "noalloc"
> annotation:
> 
>         external myfunction : ... = "myfunction" "noalloc"
> 
> and this will select a faster calling convention from Caml to C for
> this function.  If the function operates over floats, there are other
> performance tricks one can play; write me if this is the case.

I have some functions that return floats in the LAPACK-interface. They
could (slightly) benefit from more appropriate calling conventions.

If I am not mistaken, it is not ok to use "noalloc" if the C-function uses
"copy_double", because the latter could trigger the GC. If the function
returns a float, it seems that the additional annotation "float" could
be applied, but it is obviously not always used in the Pervasives library
(e.g. float_of_string; ld_exp).

Is this just an oversight or do these functions have other properties that
prevent the use of this annotation? Are there special rules to follow?

Best regards,
Markus Mottl

-- 
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


  reply	other threads:[~2001-03-23 15:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-21  8:00 Niall Dalton
2001-03-22 13:28 ` Xavier Leroy
2001-03-23 15:59   ` Markus Mottl [this message]
2001-03-29 13:29     ` Xavier Leroy

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=20010323165915.A2990@miss.wu-wien.ac.at \
    --to=mottl@miss.wu-wien.ac.at \
    --cc=Xavier.Leroy@inria.fr \
    --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).