https://github.com/qedsoftware/python-parallelism-test
Experiments with threads vs. processes in Python.
https://github.com/qedsoftware/python-parallelism-test
Last synced: 2 months ago
JSON representation
Experiments with threads vs. processes in Python.
- Host: GitHub
- URL: https://github.com/qedsoftware/python-parallelism-test
- Owner: qedsoftware
- Created: 2014-03-16T17:18:25.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-16T17:21:07.000Z (about 12 years ago)
- Last Synced: 2025-01-01T00:44:39.160Z (over 1 year ago)
- Language: Python
- Size: 113 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
THREADS VS. PROCESSES IN PYTHON
========================================
This small example compares multithreading and multiprocessing.
To test multi-threading, which works better for I/O-bound applications due to the Global Interpreter Lock:
$ time python test-thread.py
To test multi-processing, which works better for CPU-bound applications:
$ time python test-multiproc.py
Source: http://www.martinkral.sk/blog/2011/03/python-multicore-vs-threading-example/