space_packet_parser
space_packet_parser copied to clipboard
MNT: Use direct operator evaluation rather than eval()
trafficstars
We can get the dunder attribute for comparison which is faster than calling eval on the expression. Also clean up some of the uses of .values() in the comparisons.
Profiling
Goes from 1.25s in my test case to about 0.25s.
main
this branch
Checklist
- [x] Changes are fully implemented without dangling issues or TODO items
- [n/a] Deprecated/superseded code is removed or marked with deprecation warning
- [n/a] Current dependencies have been properly specified and old dependencies removed
- [n/a] New code/functionality has accompanying tests and any old tests have been updated to match any new assumptions
- [n/a] The changelog.md has been updated