On 20.06.2019 16:07, Leyne, Sean wrote:

Calling UDF is hard process. We must emulate C call stack therefore parameters
are multiple times copied here and there, making CSTRING from CHAR /
VARCHAR is also headache - there is no place for terminating zero in the end of
that string, therefore memory allocation takes place.
Almost all of that migth be avoided calling BY DESCRIPTOR but looks like there 
are
not too much UDF doing this.
That would be incorrect.  A significant number of our UDFs pass parameters by 
descriptor.

Great, I've just have not known it.

What is the use case for them not to be handled that way?

As I understood it, passing by descriptor makes the call much faster (for the 
reasons you outline), no?


Yes. It's enough to put descriptor pointer to emulated C-stack.




Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to