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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize calculate_data and redact_data() #361
Optimize calculate_data and redact_data() #361
Changes from 5 commits
97fae83
ee32807
6dfc794
8eab1f0
ef2c9ab
4a0fa09
0dd4552
e6b413f
20c0e0f
da6e06e
d82f246
c29f1fe
19b54c9
15dc185
05c8512
7625a63
e70e01d
46e5156
aa568bb
f9340c7
2ddaef0
b8acc4a
7b746c9
4371094
2c2e135
10d9d3c
9157901
aba9257
dc6637f
9ad61b1
26296a2
c29b409
7f7c652
92d4b45
07dd6dc
f565d20
6b062be
f64e492
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should :-) ... this makes me a little uneasy due to the risk of me introducing a bug later!
Is this worth the opt in the current setup? I wouldn't be surprised if
del
already does a len() check to short-circuit the operation, so this whole block might be slower.Would also be good to be rid of dist_count here so that the (potential) use later is less confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I am aware, del does not do a len check. And arithmetic operation should be faster than deleting nothing.
That being said, I assume most devices will hit the smoothing samples number and therefore always have to delete something, so maybe it makes sense to remove the if check.