The problem before was the call to strcat, which constantly had to compute the string length of the string to be concatenated to. This led to a O(n²) behavior.
Now, we simply store the location to insert the string. No need to compute the length. Now, we have linear behaviour with much smaller runtimes (up to a factor of 1000 faster) for very large vectors
The problem before was the call to strcat, which constantly had to compute the string length of the string to be concatenated to. This led to a O(n²) behavior.
Now, we simply store the location to insert the string. No need to compute the length. Now, we have linear behaviour with much smaller runtimes (up to a factor of 1000 faster) for very large vectors
Closes #183