I was wondering what the performance implications are of using std::time(0) to seed random number generators. I assume that it’s a system call (if not please correct me), which generally isn’t the best option regarding performance. Assuming std::time(0) is used many times throughout a program, will there be severe performance implications if any?
P.S. I’m more curious than anything, as currently there aren’t any performance issues.
Reseeding the RNG should be a rather rare event, so I don’t think you need to be concerned about performance. If you are reseeding frequently enough to cause a performance issue, you might want to rethink your approach — you may be doing more harm than good.