Hacker News new | ask | show | jobs
by gcp 3214 days ago
There's some funny ones there. std::random_shuffle because it relies on rand() which may be bad, but ironically most (all?) the rng's that are in the standard library would be considered "bad" by modern standards.
1 comments

"bad" for what purpose? The linear congruent stuff and Mersenne twisters, for example, are leaps and bounds better than a typical rand() implementation, and very appropriate for many uses.
Sure, but we have generators now that are both faster and better, so there's no point in using the standard ones, aside for convenience.

    aside for convenience.
You say that as if it is a small thing. Convenience, lack of additional code to maintain, consistency across platforms - for many projects these things will easily trump any algorithmic improvements from using something else.