if you ask, you never could do better
ludbega is almost right, if u have to ask u WON'T be able to make it better than existing ones.
I would suggest you pick up the source to an existing one and try to increase it's performance by working it's code. I do this with other code in my line of work all the time.
There are plenty of open source mining softwares on the internets.
If u are a newbie programmer or just don't have the experience in mining softwares it's better to go on some existing mining software github and try to understand whats going on
I'm no programmer but your question suggests that u aren't too. Programming it's not like baking, follow a recipe and it's done. It demands hard working and experience to really make a diference.