pylops.utils.scalability_test#

pylops.utils.scalability_test(Op, x, workers=None, 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.

Parameters
Oppylops.LinearOperator

Operator to test. It must allow for multiprocessing.

xnumpy.ndarray, optional

Input vector.

workerslist, optional

Number of workers to test out. Defaults to [1, 2, 4].

forwardbool, optional

Apply forward (True) or adjoint (False)

Returns
compute_timeslist

Compute times as function of workers

speeduplist

Speedup as function of workers

Examples using pylops.utils.scalability_test#

Operators with Multiprocessing

Operators with Multiprocessing