optimize hashmap lookup and insertion
Merge remote-tracking branch 'pickling/2.10.x' into 2.10.x