Are you saying "the only legal method of choosing who to lay off is a meticulously documented firing lottery", or "do it by performance, but don't admit it"?
I'm saying that there are many options with non-obvious consequences, so don't try to wing it. Any mistake will cost you orders of magnitude more than a professional advice.