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.
Moving
sum
toimmediate
speeds things up quite a bit, which various documentation on xtensor also shows.Evaling on the path align critic also helps uniquely to that critic, I suspect because of the manual looping calls only some of the values and computed at-time so it doesn't get to use vectorization optimizations.
The approximate atan2 also helps lower the runtime of the
atan2
operation by about 2x steady state and its contribution to jitter. I see you have a PR implementing it differently, which I'll test, but this does not change the existing behavior and improves things quite a bit. There's still contribution to jitter, but usually on the order of 2-4ms where before it could get upwards of 6-10 (the rest is probably the cosine or hypot). Doesn't help with any other sources of jitter. Incremental progress.Removed
dt
, as it is never used or referenced