Various random performance tricks