The information in this answer is no longer correct. It was correct back in the days of strict co-scheduling, but is no longer the case.
I am keeping the answer below for posterity's sake, but please do not rely on it to be accurate for modern hypervisors.
You should never assign all your cores as vCPUs in a virtual machine.
If a VM requests any CPU time, VMWare must allocate either all the vCPUs or none of the vCPUs.
What this means is, on a 4-core system if you allocate all 4 cores, then only either the host, or the guest, can be allocated processor time, not both at the same time.
This will absolutely ruin performance in both environments.
Feel free to allocate an odd number of cores (say, 3). It may feel strange, but it's a totally legitimate option.
Generally, I never allocate more than n/2 vCPUs (in your case, 2), but I'm normally allocating cores on servers with between 12 and 32 cores where you can allocate many vCPUs without major impact.