AB-CE / abce

Agent-based computational Economics, the Python library that makes AB modelling easier
http://abce.readthedocs.io
190 stars 64 forks source link

Pickle offer only when offer is handed over between processes. API update for speedtest and paralleltest #63

Closed DavoudTaghawiNejad closed 7 years ago

rht commented 7 years ago

Why shouldn't the offer always be pickled? Or would the code run faster if pickling is done only when an offer is transferred between processes?

DavoudTaghawiNejad commented 7 years ago

Pickling takes time. It is unnecessary if an offer is passed between to agents using the same process (memory). This can be either because two agents are in the same process or because we run the simulation in a single process.