Improve speed of STSIM