Thread Prefix optimization