On Tue, Mar 30, 2010 at 11:57, Xavier Leroy <xavier.le...@inria.fr> wrote: > Yes. Actually, it is forbidden to call any function of the OCaml > runtime system from a noalloc function.
It may not always be clear to developers whether a function provided by the OCaml API is safe. E.g. calling Val_int is fine (at least now and for the foreseeable future), but caml_copy_string is not. I agree that people should generally avoid noalloc. The speed difference is clearly negligible in almost all practical cases. Note, too, that sometimes people forget that they had declared a previously safe function as "noalloc", but later change the C-code in ways that breaks this property. The tiny extra performance may not be worth that risk. Regards, Markus -- Markus Mottl http://www.ocaml.info markus.mo...@gmail.com _______________________________________________ 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