3 ms·
C++ is one of the very few performance critical languages, performance will always be it's #1 feature, even above safety (which can be pushed back to libraries
by lonelappde 7y ago
C++ is one of the very few performance critical languages, performance will always be it's #1 feature,
even above safety (which can be pushed back to libraries if performance demands it) so implementation details matter a lot more than in other languages.
- klodolph 7y agoThis is not the full explanation. The key problem here is that C++ runs on nearly everything, from your garden variety x86 to bizarre DSP architectures. The many, many template parameters are there so you can simultaneously say “you don’t pay for what you don’t use” and provide a library that works on weird systems.
- Veedrac 7y agoThis absolutely doesn't explain C++'s weirdness. Those template parameters don't make anything faster, its broken seeding ends up pretty slow, and a Mersenne Twister is hardly performance- (or anything-)optimal. Heck, some of those template parameters are probably used by a sum total of zero people in production code.