Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Inline assembly?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-03-29 (13:29)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] Inline assembly?
> > 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).

Currently, the "float" annotation works only for external functions
where the result and all parameters are of type "float".  Typically,
transcendental and trigonometric functions.  In this case, the
arguments and result are passed unboxed, as C "double" floats.  But it
doesn't work for functions that take / return a mixture of floats and
other data types.

- Xavier Leroy
To unsubscribe, mail  Archives: