The rim size is not as important as the diameter of the rim+wheel, and 650B wheels are often run with wider tires that approximate the diameter of a 700c wheel/tire, but with more air acting as a cushion.
Even with the same width tire, though - say, 600Bx40 compared to 700Cx40, the difference is miniscule. If you are using 650B and your buddy has 700C and he is faster than you, it's not the tire's fault.
I would stick to 700 because there are more tire options, but on the road it makes virtually no difference.