Skip to content

Commit

Permalink
Function Wrapper Cache (#236)
Browse files Browse the repository at this point in the history
* 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.

* Moved creation of `parameterTypes` array to after the cache is checked (one less allocation in the cached path).

* Added a test which detects incorrectly cached functions (due to covariant return).

* Update src/Function.Wrap.tt

Co-authored-by: Konstantin Preißer <[email protected]>

* Regenerated `Function.Wrap.cs` to include changes added in the previous commit

---------

Co-authored-by: Konstantin Preißer <[email protected]>
  • Loading branch information
martindevans and kpreisser authored Apr 21, 2023
1 parent 591beff commit 0c51117
Show file tree
Hide file tree
Showing 4 changed files with 590 additions and 70 deletions.
Loading

0 comments on commit 0c51117

Please sign in to comment.