.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_build/auto_examples/benchmarks/SegmQuad_LowLevel_bench.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr__build_auto_examples_benchmarks_SegmQuad_LowLevel_bench.py: Benchmark of LowLevelCallable for Segment Quadrature ==================================================== .. GENERATED FROM PYTHON SOURCE LINES 7-8 Definition of benchmarked integrands .. GENERATED FROM PYTHON SOURCE LINES 8-41 .. code-block:: Python all_funs_scalar = { 'py_fun' : test_from_scalar_fun(py_fun) , 'py_fun_array' : test_from_scalar_fun(py_fun_array) , 'nb_fun' : test_from_scalar_fun(nb_fun) , 'nb_fun_pointer' : test_from_scalar_fun(nb_fun_pointer) , 'nb_fun_inplace_pointer' : test_from_scalar_fun(nb_fun_inplace_pointer) , 'py_fun_in_pyx' : test_from_scalar_fun(choreo.scipy_plus.cython.test.single_py_fun) , 'cy_fun_pointer_LowLevel' : test_from_scalar_fun(scipy.LowLevelCallable.from_cython(choreo.scipy_plus.cython.test, "single_cy_fun_pointer")), 'cy_fun_memoryview_LowLevel' : test_from_scalar_fun(scipy.LowLevelCallable.from_cython(choreo.scipy_plus.cython.test, "single_cy_fun_memoryview")), 'cy_fun_oneval_LowLevel' : test_from_scalar_fun(scipy.LowLevelCallable.from_cython(choreo.scipy_plus.cython.test, "single_cy_fun_oneval")), } all_funs_vect = { 'py_fun' : None, 'py_fun_array' : test_from_vect_fun(mul_py_fun_array) , 'nb_fun' : None , 'nb_fun_pointer' : test_from_vect_fun(mul_nb_fun_pointer) , 'nb_fun_inplace_pointer' : test_from_vect_fun(mul_nb_fun_inplace_pointer) , 'py_fun_in_pyx' : test_from_vect_fun(choreo.scipy_plus.cython.test.mul_py_fun), 'cy_fun_pointer_LowLevel' : test_from_vect_fun(scipy.LowLevelCallable.from_cython(choreo.scipy_plus.cython.test, "mul_cy_fun_pointer")), 'cy_fun_memoryview_LowLevel' : test_from_vect_fun(scipy.LowLevelCallable.from_cython(choreo.scipy_plus.cython.test, "mul_cy_fun_memoryview")), } all_benchs = { 'Scalar function' : all_funs_scalar , f'Vector function of size {choreo.scipy_plus.cython.test.mul_size_py}' : all_funs_vect , } .. image-sg:: /_build/auto_examples/benchmarks/images/sphx_glr_SegmQuad_LowLevel_bench_001.png :alt: Scalar function, Vector function of size 10 :srcset: /_build/auto_examples/benchmarks/images/sphx_glr_SegmQuad_LowLevel_bench_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.085 seconds) .. _sphx_glr_download__build_auto_examples_benchmarks_SegmQuad_LowLevel_bench.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: SegmQuad_LowLevel_bench.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: SegmQuad_LowLevel_bench.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_