You can now use simoptions.whichstats to control which statistics are calculated, and if, e.g., you are just wanting the mean and standard deviation, then this will be much faster
[intended to make it easier to use them in loops/optimization; default remains to compute all the statistics as if you only do it once it is anyway fast enough and is easy to use]
You set: simoptions.whichstats=ones(1,7); % by default, compute all stats
% zero values in this optional input are used to skip some stats and thereby cut runtimes
% 1st element: mean
% 2nd element: median
% 3rd element: std dev and variance
% 4th element: lorenz curve and gini coefficient
% 5th element: min/max
% 6th element: quantiles
% 7th element: More Inequality
Then just call the standard life-cycle profile or AllStats commands, and they will only compute the moments you want. If you are unsure what these all are, just run the command with default and you can look at the output structure to see what they refer to
So for example, set simoptions.whichstats=[1,0,1,0,0,0,0] and you will just get the mean and standard deviation (and variance). The runtime will be much faster as things like the lorenz curve and quantiles take most of the runtime.
For the 4th and 6th stats (Gini+Lorenz and Quantiles) you can set a value of 2, which uses a faster but more memory-intensive way to compute them.
The defaults internally are:
simoptions.whichstats=[1,1,1,1,1,1,1] for AllStats
simoptions.whichstats=[1,1,1,2,1,2,1] for LifeCycleProfiles
(4th entry is Lorenz+Gini, 6th entry is Quantiles)