Skip to content

Remove even more closure allocations in ObjectReferenceWithContext<T> - #1589

Merged
Sergio Pedri (Sergio0694) merged 3 commits into
user/sergiopedri/remove-obj-ref-context-allocfrom
user/sergiopedri/skip-context-allocs
Apr 26, 2024
Merged

Sergio Pedri (Sergio0694) merged 3 commits into
user/sergiopedri/remove-obj-ref-context-allocfrom
user/sergiopedri/skip-context-allocs

Conversation

@Sergio0694

Copy link
Copy Markdown
Member

Builds on top of #1587 and further improves things. This drops all closures for Context callback invocations.

@Sergio0694 Sergio Pedri (Sergio0694) added performance Related to performance work gc Related to garbage collection labels Apr 24, 2024
@Sergio0694
Sergio Pedri (Sergio0694) force-pushed the user/sergiopedri/skip-context-allocs branch 2 times, most recently from 424935a to cd2100c Compare April 24, 2024 18:44
@Sergio0694

Copy link
Copy Markdown
Member Author

Just for context (ha!), saves 3 KB from target. Target uses 4 KB more than its own target, set is just +1 KB for everything.

image

Honestly would've still been worth it regardless given the perf/memory improvement, but still ๐Ÿ˜„

@Sergio0694
Sergio Pedri (Sergio0694) marked this pull request as ready for review April 25, 2024 16:47
@Sergio0694
Sergio Pedri (Sergio0694) merged commit 74993a3 into user/sergiopedri/remove-obj-ref-context-alloc Apr 26, 2024
@Sergio0694
Sergio Pedri (Sergio0694) deleted the user/sergiopedri/skip-context-allocs branch April 26, 2024 06:01
Sergio Pedri (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
Sergio Pedri (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
Sergio Pedri (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