lines 6-66 of file: python/cmpad/fun_speed.py {xrst_begin py_fun_speed} Determine Python Execution Speed ################################ Syntax ****** | |tab| *y* = *fun_obj* ( *x* ) | |tab| *rate* = ``cmpad::fun_speed`` ( *fun_obj*, *option*, *min_time* ) Prototype ********* {xrst_literal , # BEGIN DEF, # END DEF # BEGIN RETURN, # END RETURN } fun_obj ******* We are testing the speed of the evaluation of this :ref:`cpp_fun_obj-name` . x * This is a vector like object :ref:`cpp_fun_obj@x` for the function object. y * This is the vector like object :ref:`cpp_fun_obj@y` for the function object. option ****** This python dictionary is used to :ref:`cpp_fun_obj@setup` the function object. time_setup ========== If *option*\ ``['time_setup']`` is true (false) the setup function is (is not) included in the time for each function evaluation. If the setup time is not included, the only thing that changes between function evaluations is the argument vector *x* . min_time ******** This is the minimum time in seconds for the timing of the computation. The computation of the function object will be repeated enough times so that this minimum time is reached. rate **** This is the speed of one computation of the function object; i.e., the number of times per second that the function object gets computed. {xrst_toc_hidden python/xam/fun_speed.py } Example ******* :ref:`xam_fun_speed.py-name` is an example and test that uses this function. {xrst_end py_fun_speed}