Optimizations for speed