Comment Re:Check their work or check the summary? (Score 1) 486
All they did compare was one memory access vs. another memory access, and showed that Strings are inefficient compared to a byte array. Because the first code will concatenate Strings in memory, the second code will concatenate byte array data in memory, and then both are written to disk. The disk-access test should have been:
for (int i=0; i numIter; i++) {
writer.write(addString);
writer.flush();
writer.close();
}