Model the running time of each array operation under three implementations (pure Python, Cython, NumPy) and summarise the pipeline.
Inputs: n (array size) and operations, a list of dicts with name, <method>_per_elem_ns and <method>_overhead_ns for method in python, cython, numpy.
Per operation:
cython_speedup, numpy_speedup: Python time divided by that method's time.best: the method with the lowest time; on ties the alphabetically first (cython < numpy < python).-1 if cython_per_elem_ns <= numpy_per_elem_ns, and 0 if the ratio is .Pipeline: sum each method's unrounded times over all operations; recommended is the method with the lowest total (same tie rule).
Return a dict with:
operations: list of dicts with name, python_us, cython_us, numpy_us, cython_speedup, numpy_speedup, bestpipeline_python_us, pipeline_cython_us, pipeline_numpy_usrecommendedcrossover_sizes: {name: crossover}All floats rounded to 2 decimals.