3 ms·
Most C++ code I have seen does not even approach this level of care and customization. True, but all of this isn't neccesary to be faster than java. When we a
by CyberDildonics 3y ago
Most C++ code I have seen does not even approach this level of care and customization.
True, but all of this isn't neccesary to be faster than java.
When we are talking about speed, most people mean basic out-of-the-box speed of the code without heroic efforts.
Fair enough in general. All it takes in C++ is allocating memory out of hot loops and looping through memory linearly. This basically eliminates memory allocation as a bottleneck and pointer chasing as a bottleneck. These two things alone can make a program 100x faster or more.
In C++ makes this is often the simplest possible way to do something, although unfortunately that doesn't mean programs are always done like this.