Which are faster a virtual function or non-virtual? Assuming that both has same code.
it depends on cpu
virtual functions are faster as it uses virtual tables internally.
non-virtual functions are faster as there is no extra internal virtual table look up, when that function is called.
we can't predict
Back To Top