You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to call user-supplied Python function from code performing numerical integration. Currently, I do f(x).cast<value_type>(), where f is pybind11::function. However, I've found that this call is considerable slower than calling C++ function. What do I do wrong? How could I improve the performance?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I need to call user-supplied Python function from code performing numerical integration. Currently, I do
f(x).cast<value_type>()
, wheref
ispybind11::function
. However, I've found that this call is considerable slower than calling C++ function. What do I do wrong? How could I improve the performance?Beta Was this translation helpful? Give feedback.
All reactions