View Single Post

   
  #1 (permalink)  
Old 04-19-2008, 07:53 PM
Evgeny Vainerman
 
Posts: n/a
Default C UDR returns mi_double_precision

I want to run a C UDR that returns CDOUBLETYPE (mi_double_precision).
As far as I understood from the guide, the function cannot return
mi_double_precision by value, the only one option - by reference.
Following this constraint, I allocate a portion of memory with
mi_alloc and return the pointer.

The performance of the function is dramatically low! My assuming -
because of allocation.

Another option is to keep static variable and re-use it, but avoid
parallel execution of the function - also undesirable.

Is there alternative approach? Is it possible to avoid allocation?
Reply With Quote