python3.5_coro_testing
python3.5_coro_testing copied to clipboard
A little suite of tests for gauging the speed of various Python concurrency methods.
Testing Python 3.5's various concurrency methods
A little suite of tests for gauging the speed of various Python concurrency methods.
This suite tests:
- CPU Bound operations
- I/O Bound operations
- A mix of CPU and I/O operations
Each of the tests contains 5 parts:
- Sequential execution (for comparison).
- Multiprocessing pool execution (classical Python multiprocessing)
- Multithreading pool execution (classical Python threading)
- Python 3.5 async Coroutines (using a multiprocessing pool)
- Python 3.5 async Coroutines (using a threading pool)
Each of the 3 test types should be taken seperately as they contain different computations.
Test it yourself
git clone https://github.com/Sonictherocketman/python3.5_coro_testing
cd python3.5_coro_testing
bash run.sh
Sample Results
Retina Macbook Pro (2014, 13")
| Type | Test | Time |
|---|---|---|
| CPU Bound | Serial | 7.804 |
| Coro Multi | 4.739s | Coro Thread | 8.221s |
| Multiprocess | 4.488s | |
| Threading | 8.251s |