A safe function does not push anything on the s7 stack, and treats the arg list passed to it as immutable and temporary (that is, it just grabs the arguments from the list). A few s7_* functions are unsafe, and that makes anything that calls them also unsafe. If the optimizer knows a function is safe, it can use prebuilt lists to pass the arguments (saving in the GC), and can combine it in various ways with other stuff. If the safe function knows its return and argument
types, there is another level of optimization that can call it without
setting up an arglist or "unboxing" values, basically a direct call in C. s7.html has a brief example (see s7_set_i_i_function), and there are many
examples in s7.c and clm2xen.c in Snd.

_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to