4 ms·
I ran into this a few years back. In a gawk program, I had to build a 300,000,000 character string by concatenating about 10,000,000 32-character strings. My na
by mjcohen 12y ago
I ran into this a few years back. In a gawk program, I had to build a 300,000,000 character string by concatenating about 10,000,000 32-character strings. My naive code of doing 10,000,000 "a = a+str" took forever. I finally did sqrt(n) iterations of sqrt(n) concatenations and it took about 10 seconds.