How long time did it take to generate 1 million keys?
Around 2 hours
holly shit, then your code must be horrible. generating 1 million private keys should not take more than a minute or so. and that's just if you use CPU not GPU, with a GPU it can be a lot higher than that. and that is based on my code written in C# which is a managed language and slow, yours seem to be in C so it shouldn't take about 30 seconds!
Generating 2 same Bitcoin address is possible, but for that you must be very very very lucky.
lol, it is impossible and you are wasting your time.