space_packet_parser icon indicating copy to clipboard operation
space_packet_parser copied to clipboard

MNT: Use direct operator evaluation rather than eval()

Open greglucas opened this issue 1 year ago • 0 comments
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 image this branch image

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

greglucas avatar Jul 30 '24 23:07 greglucas