Fixed.startOfWeek performs an O(n) search backwards to find the closest day with the proper .dayOfWeek value. This could be short-circuited by attempting to calculate how far away the start of the week should be, jumping to it, and testing the value. Then the iterative approach could be used as a fallback.