Performance optimizations on TR