Merging an important performance improvement into master.