Pie is generally superior, though it can depend on the type of pie and cake involved (my mom bakes an excellent chocolate chip cake which outclasses many pies).