Skip to content

Conversation

@greglucas
Copy link
Collaborator

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

  • 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

We can get the dunder attribute for comparison which is faster
than calling eval on the expression.
@greglucas greglucas requested a review from medley56 as a code owner July 30, 2024 23:20
Copy link
Member

@medley56 medley56 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Nice improvement here. eval is gross.

@medley56 medley56 merged commit 39b9d7c into lasp:main Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants