On Tue, Mar 30, 2010 at 11:57, Xavier Leroy <[email protected]> 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 [email protected] ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Savonet-devl mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-devl
