https://github.com/quantecon/parallelization_experiments
https://github.com/quantecon/parallelization_experiments
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/quantecon/parallelization_experiments
- Owner: QuantEcon
- License: bsd-3-clause
- Created: 2018-02-16T03:20:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-14T03:30:48.000Z (about 8 years ago)
- Last Synced: 2025-04-28T11:22:29.324Z (about 1 year ago)
- Language: Jupyter Notebook
- Size: 706 KB
- Stars: 3
- Watchers: 5
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Parallelization Experiments
Here's a fun test case for parallelization. In essence we're populating a
matrix by simulation, with each row corresponding to one simulation of a given
firm's inventory process.
The firm's inventory process is of (s, S) type with stochastic IID demand.
The notebook "inventory_dynamics.ipynb" is just for background. I (jstac)
wrote it for a workshop.
The notebook "efficient_inventory_dynamics.ipynb" runs the simulation
described above.
I parallelize the task with `numba.prange`. Numba does a great job of
parallelizing this task efficiently --- which is non-trivial, because the
execution time of each round of the loop is very small (firm's inventory is
simulated for only 400 periods).
Question: How do Matlab and Julia's simple parallelization implementations do
on this task?
I'm mainly interested in naive implementations that leave most of the
logic unchanged. That is, I want to know how good each of the parallelization
interfaces is at collecting low hanging fruit.