Removes O(n) function from the critical path.