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 pull request is related to #74 adding a request / release lock in the cci param interface and so the implementation.
The lock is "unique" for all set/get by simplicity.
Some benchmark results :
Test has been done 5 times and the result is an average:
Test :
for(int i = 0; i < 100000000; i++) {
"param" = i;
}
Results on Linux :
unsigned int : 0.198s
cci_param : 12.98s
cci_param thread safe GCC atomics : 13,58 (+ 4,7%)
cci_param thread safe x86 : 14,66 (+ 12,96%)
cci_param thread safe pthread spin lock : 13,68 (+ 13,11%)
On OSX, x86 is faster than GCC atomics and the overhead is +1.4% (pthread spin lock not available)
Untested on Windows