Linear and Not Parallelized#
Code Example#
Example of how to run multiple browsers sequentially after each other and not in parallel:
Which Method Is Faster?#
Multi-processing and multi-threading are the fastest methods, sometimes twice as fast as running the same job in linear or asynchronous mode. For instance, measuring execution time of the code examples below yield the results like this in seconds:
Method | Rank | Improvement | Average | Min | Max |
---|---|---|---|---|---|
Linear | Baseline | 8.59 | 8.55 | 8.62 | |
Asynchronous | 2 % | 8.42 | 8.33 | 8.48 | |
Multi-threading | 103 % | 4.24 | 4.20 | 4.29 | |
Multi-processing | 105 % | 4.20 | 3.69 | 6.05 |