More trivial optimizations to a function well outside the critical path