5 ms·
I built a string this way in java just 5 years ago. Still made it 100x times faster by using a StringBuilder.
by hmottestad 12y ago
I built a string this way in java just 5 years ago. Still made it 100x times faster by using a StringBuilder.
- reinhardt 12y agoSo like 1ms down from 100ms? Either way a rounding error in the episode-of-LOST-average-duration timescale ;)
- hmottestad 12y agoWhy don't you give it a try yourself. Create a file with a high ratio of lines to length, and read it in using a loop and string concat, or builder. Do it with a builder first, when you get up to 1 minute, switch over to concat and see how long it takes.