In C++, it is legal to give an implementation of a pure virtual function:
class C
{
public:
virtual int f() = 0;
};
int C::f()
{
return 0;
}
Regarding the speed of the virtual destructor this is because the destructor is defined in the cpp file and not the header. It has more to do with size than speed. It is explained in detail in "Large-Scale C++ Software Design". Unfortunately I cannot remember all the details, but I think inline virtual functions get defined multiple times in the vtable.
There is a discussion this here: Are inline virtual functions really a non-sense?