FieldRef::getPart() gets called a lot; even moreso due to commit 851cfd2d . I observed that in https://github.com/10gen/mongo/blob/1c5aac135c035b7a7278a2dc49b44aa371e1cd1b/src/mongo/db/field_ref.cpp#L194-L197 we check the bounds on _parts, but _parts is a boost::container::small_vector which already does a bounds check in operator[](): https://github.com/10gen/mongo/blob/4973ef272c16f83e855c0d8ab5c9c2dc0d47d39f/src/third_party/boost/boost/container/vector.hpp#L1654
So we can remove that invariant check and save ~5%.