DLR-SC / tixi

A simple XML interface library
Apache License 2.0
35 stars 16 forks source link

Improved performance of tixiAdd/UpdateFloatVector #192

Closed rainman110 closed 2 years ago

rainman110 commented 2 years ago

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