[Ecls-list] When to use DFFI?

Juan Jose Garcia Ripoll lisp at arrakis.es
Fri Oct 21 06:47:22 UTC 2005


On Fri, 2005-10-21 at 15:05 +0200, Goffioul Michael wrote:
> 1) if #-DFFI, go always static
> 2) if #+DFFI,
> 	- go always dynamic (default)
> 	- go always static if specified (for example with a global variable)

DFFI is good, but is not the panacea and I would not restrict the
implementation to dynamically generated function calls and callbacks.

For many reasons, but for instance, dynamic callbacks and using
si:call-cfun are both more expensive than statically compiled code ---
i.e. code generated by the compiler---.

And at some point we might find that because of memory permissions, we
cannot do dynamic callbacks while we can still do si::call-cfun.

That can even happen on the same platform: some linuxes will have
disabled the executable permissions on malloc'ed pages, some will not.
But if you distribute compiled FASLs they will run independently of the
security policy of the system.

So, in other words, I would rather restrict the DFFI for situations
which require change: dynamical generation of code, and experimentation,
command-line type interactions, interpreted code which can be better
debugged, etc.

Regards,

Juanjo





More information about the ecl-devel mailing list