News for hackers. Stuff that matters.
Re:Perl, Python, Ruby, PHP, C, C++, Lua, tcl, JavaScript and... by erobbins on Monday March 24, 2014 @09:50PM (#7463229)
this is pretty bad code.

For the C version, just changing strcat(gstr, str); to strcat(&gstr[lngth - str_len], str); cuts the execution time by 1/4 for the longest cases.

original: 471sec 4096kb

changed: 356sec 4096kb

There are no comments on this comment yet.