Remove quadratic scaling with number of layers
This PR removes the quadratic scaling with the number of layers:
- when creating a multilayer
- when running a simulation, as long as no parameter distribution is present
As a result, the runtime is pretty linear now also for large numbers of layers. "Old" in these plots refers to timings before MR !7 (merged).
For completeness, updated timing with constant number of layers. Again, compared to the state before MR !7 (merged).
More timing results: Here, it is split into the full runtime (create sample + create simulation + run simulation) and only the run step (run simulation). For constant number of layers: For constant number of Q points
All timings were done with a single thread and without any resolution correction. Multi-threading slows things down considerably for small numbers of layers and points.