-
Notifications
You must be signed in to change notification settings - Fork 50
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
Function Wrapper Cache #236
Function Wrapper Cache #236
Conversation
…s Wrap to be called multiple times without lots of allocations of the same thing.
…d (one less allocation in the cached path).
Co-authored-by: Konstantin Preißer <[email protected]>
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.
Looks good to me! Can you rebuild the project in order to regenerate Function.Wrap.cs
, and commit it? (As my suggestion commit only modified Function.Wrap.tt
.)
Thanks!
I've regenerated that file and pushed it 👍 |
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.
Sorry for the delay in reviewing this. Looks good!
Added a cache to
Function
which stores wrapped function. This allows Wrap to be called multiple times without lots of allocations of the same thing.This will work well with #235 - a
Caller
can ask for aFunction
object (cached) and then wrap it (cached) and then call it, all without allocating anything 🥳