Skip to content
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

Skip closure allocation in ObjectReferenceWithContext<T> #1587

Conversation

Sergio0694
Copy link
Member

Small optimization to ObjectReferenceWithContext<T> on modern .NET, we can skip a closure.

@Sergio0694 Sergio0694 added performance Related to performance work gc Related to garbage collection labels Apr 23, 2024
@Sergio0694 Sergio0694 requested a review from manodasanW April 23, 2024 23:09
@Sergio0694 Sergio0694 force-pushed the user/sergiopedri/fix-obj-ref-trim-warning branch from bba100c to fb6e682 Compare April 24, 2024 16:43
@Sergio0694 Sergio0694 force-pushed the user/sergiopedri/remove-obj-ref-context-alloc branch from 1ed967a to a22dd40 Compare April 24, 2024 16:44
@Sergio0694 Sergio0694 force-pushed the user/sergiopedri/fix-obj-ref-trim-warning branch from fb6e682 to 088ff41 Compare April 24, 2024 16:45
@Sergio0694 Sergio0694 force-pushed the user/sergiopedri/remove-obj-ref-context-alloc branch from a22dd40 to 3d45626 Compare April 24, 2024 16:45
…#1589)

* Skip closures for 'Context.CallInContext' calls

* Use function pointers instead of delegates

* Move context lambda to FOH
@Sergio0694 Sergio0694 merged commit b3ae801 into user/sergiopedri/fix-obj-ref-trim-warning Apr 26, 2024
1 of 9 checks passed
@Sergio0694 Sergio0694 deleted the user/sergiopedri/remove-obj-ref-context-alloc branch April 26, 2024 06:01
Sergio0694 added a commit that referenced this pull request Apr 26, 2024
* Skip closure allocation in ObjectReferenceWithContext<T>

* Remove even more closure allocations in ObjectReferenceWithContext<T> (#1589)

* Skip closures for 'Context.CallInContext' calls

* Use function pointers instead of delegates

* Move context lambda to FOH
Sergio0694 added a commit that referenced this pull request Apr 26, 2024
* Fix trim warning for '_iid' in 'ObjectReference<T>'

* Remove duplicate IID definition

* Validate that input 'iid' arguments are not empty

* Optimize 'CreateForCurrentContext' on NAOT

* Fix generated 'ActivateInstance<I>' method

* Fix trim warning in 'IMarshal' in Windows SDK

* Skip closure allocation in ObjectReferenceWithContext<T> (#1587)

* Skip closure allocation in ObjectReferenceWithContext<T>

* Remove even more closure allocations in ObjectReferenceWithContext<T> (#1589)

* Skip closures for 'Context.CallInContext' calls

* Use function pointers instead of delegates

* Move context lambda to FOH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gc Related to garbage collection performance Related to performance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants