On Mon, Nov 02, 2009 at 05:11:27PM +0100, Goswin von Brederlow wrote: > Richard Jones <r...@annexia.org> writes: > > > On Sun, Nov 01, 2009 at 04:11:52PM +0100, Goswin von Brederlow wrote: > >> But C calls are still 33% slower than direct access in ocaml (if one > >> doesn't use the polymorphic functions). > > > > Are you using noalloc calls? > > > > http://camltastic.blogspot.com/2008/08/tip-calling-c-functions-directly-with.html > > Yes. And I looked at the bigarray module and couldn't figure out how > they differ from my own external function. Only difference I see is > the leading "%" on the external name. What does that do?
That means that it is using a hardcoded OCaml primitive, whose code can be generated by the compiler via C--. See asmcomp/cmmgen.ml. > > I would love to see inline assembler supported by the compiler. It might be possible to hack support for C-- expressions in external declarations. That'd be a sort of portable assembler. -- Mauricio Fernandez - http://eigenclass.org _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs