-
Notifications
You must be signed in to change notification settings - Fork 95
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
Use match_shared in the main eval loop #1698
Conversation
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.
There are a bunch of places where you've removed clone()
calls because now we're taking ownership, but there are other places where the clone()
calls have stuck around, and I'm not sure if that's because something different is happening there or because you missed them.
I only marked a couple of them, but saw a bunch more.
Good catch, I thought I had them all, but did an additional search and fix and got a few more. Now there shouldn't be remaining undue clones in |
020b712
to
39bad0d
Compare
A long standing todo was to use
match_shared
inside the main eval loop, such that some operations (typically array and record closurization) don't have to unduly copy data if they can take ownership on a 1-countedRc
. We were just waiting for nice formatting which has landed in #1677.It doesn't seem to have a huge effect on #1622 (the effect is expected to be more salient on either small programs or programs with huge arrays and records), in one direction or another, and the benchmarks are way too volatile right now to make any sense of them (it's an important, but a separate one). If anything, this PR improves the documentation and the signature of various evaluation functions by returning closures instead of tuples.