3 ms·
The string benchmark has the issue that the amount of work done varies with each pass through the loop since the string just keeps getting appended to. A prope
by friday99 9y ago
The string benchmark has the issue that the amount of work done varies with each pass through the loop since the string just keeps getting appended to. A proper benchmark like the ones in the comments here do the same amount of work for every loop.