Commit e58eb5ed authored by Médéric Boquien's avatar Médéric Boquien
Browse files

Avoid making a copy when storing the redshifted SED. This SED will never be...

Avoid making a copy when storing the redshifted SED. This SED will never be modified. This is done by copying what is returned by get_sed rather than having get_sed return directly a copy.
parent 09dac7d2
......@@ -20,6 +20,7 @@
- The access to the SED and module caches has been made faster and simpler. This results in a speedup of ~6% in the computation of the models. (Médéric Boquien)
- The models counter was a bottleneck when using many cores as updating it could stall other parallel processes. Now the internal counter is updated much less frequently. The speedup goes from between negligible (few cores) up to a factor of a few (many cores). The downside is the the updates on the screen may be a bit irregular. (Médéric Boquien)
- It turns out that elevating an array to some power is an especially slow operation in python. The `dustatt_calzleit` module has been optimised leading to a massive speed improvement. This speedup is especially large for models that do not include dust emission. (Médéric Boquien)
- Making copies of partially computed SED when storing them to the cache can be slow. Now we avoid making copies of the redshifted SED. The speedup should be especially noticeable when computing a set of models with numerous redshifts. (Médéric Boquien)
## 0.12.1 (2018-02-27)
### Fixed
......@@ -132,9 +132,9 @@ class SedWarehouse(object):
if (len(module_list) == 0):
sed = SED()
sed = self.get_sed(module_list, parameter_list)
sed = self.get_sed(module_list, parameter_list).copy()
self.sed_cache[key] = sed
return sed.copy()
return sed
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment