pylops.utils.scalability_test(Op, x, workers=[1, 2, 4], forward=True)[source]

Scalability test.

Small auxiliary routine to test the performance of operators using multiprocessing. This helps identifying the maximum number of workers beyond which no performance gain is observed.

Op : pylops.LinearOperator

Operator to test. It must allow for multiprocessing.

x : numpy.ndarray, optional

Input vector.

workers : list, optional

Number of workers to test out.

forward : bool, optional

Apply forward (True) or adjoint (False)

compute_times : list

Compute times as function of workers

speedup : list

Speedup as function of workers

Examples using pylops.utils.scalability_test