Improved generation time of samples