I've discussed this situation with several managers recently. The manager says, “I have a wonderful developer, who can code circles around everyone else. If he doesn't like someone else's code, he rewrites it over the weekend. If he sees a hole, he writes a ton of code over the weekend He starts work early and works late. But, I have a tiny little problem. I can't keep people who might be just as good. I can keep people who are not as talented, but can't retain people who are not quite as good. But that's ok, isn't it? After all, don't I have the most productive employee?”
Let's review what productive means for software. It means the most number of features per unit time per team. Personal productivity is meaningless. Keeping everyone busy is meaningless. But having one employee who is a bottleneck, or one employee who prevents a team from increasing their overall capacity (running tested features per unit time), that's a problem.
One manager who had this problem has a bottleneck employee, one who prevents other people from doing their work, by interrupting others from finishing their work. (See Retrain Your Code Czar for an article I wrote about this a number of years ago.) Bottleneck employees are frustrating to the rest of the team and prevent everyone from accomplishing work–except the work they want to accomplish.
Another manager has the problem of one person bringing down the expertise of the entire group by being an indispensable employee. Indispensable employees prevent other people from learning because they take care of things for other people. Other smart people don't want to work with the indispensable employee because they don't get the challenge of solving the problem themselves. Indispensable employees are quite dangerous to the longterm health and success of your group.
If you are faced with one really productive employee and some not-so-hot folks, reexamine your situation. Do you have a bottleneck or an indispensable employee? If so, fix the situation. They are not helping you.