I was reading the source of java.util.HashMap and noticed it almost always assign the table field to a local variable if the value is used more than once in the method.
Since this class is documented to be not thread-safe and the field is not volatile, what's the point of this? Does it make the code more efficient?