There is probably no difference because none of the functions access data members and you are not getting anything virtual.
But in the general case, the βbarβ will be infinitely faster, because βfooβ as a member function usually has to go through and use an additional argument - βthisβ
source
share