I would time using iterators instead.
If not using iterators, then I might at least use
1) size_t const record_size=lhs.get_record_size();
before the loop. That way it is clearer to the optimizer that the value does not change in the loop.
2) Depending on how simple your class is, you might be able to use memcmp in your comparison operator.
If vector actually allocated all of the memory in a contiguous physical block then you could have an easy check using memcmp.
Note the following (Herb Sutter)
It’s so important, in fact, that when it was discovered that the C++98 standard didn’t completely guarantee contiguity, the C++03 standard was amended to explicitly add the guarantee.