Layoffs make it easier to get rid of underperforming people without having to file too much paperwork, so it probably has a better effect on the median employee quality to do layoffs instead of a hiring freeze.
Easier but not better.
If you have a performance problem, there is a process in place to to deal with it. Not easy, but it gives the employee notice and the opportunity to improve. Vs. Gone.