Added switch to GetStat

When N*T>5e6, statistics will be calculated less efficiently, but with
reasonable memory requirements