Speed up writing C3D-files from python #218
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR speeds up the
c3d.write()
call in python. This is done by 2 ways:new_c3d
-object was moved from Python to C++The results in the following improvements on
c3d.write() on the example file
Cortex.c3d` on my machine:new_c3d
filled in C++new_c3d
filles in C++ and improved Label-CheckSo in this particular example we see an 10x speed improvement.
I don't know if the code changes will be covered by existing tests. They should be though, since writing to disk is no new functionality.
If I deviate from the coding style of the rest of the code base too much, please tell me how to improve.