I bet the  x.size() == y.size() as a qualifier before a real compare is what is helping.  Not so much the switch from boost to std.