Don't automaticlly flush after print, it leads to poor performance (it's better if the user controls this)
Some optimizations to pnoise sample