...
This shows that the algorithm is essentially linearly dependent on the number of events (apart from a short initialization timethe inflection between 50 and 100 might be due to memory management, or just noise):
Profiling
I used this command to profile the execution:
...
This is essentially only checking if the name contains "TimeTick", because in that case it has to generate a new piece of simulated FT2 file. In my case I am using a real FT2 file, so the check is false. Now, as a quick-and-dirty fix, just by substituting that line with:
...
Boost | Execution time (s) | Old execution time (s) |
---|---|---|
10 | 7.636 | 20.802 |
50 | 28.375 | 92.315 |
100 | 53.868 | 197.87353.868 |
An easy fix would be to cache the name of the source in the FluxSource class, so that it is only computed once.