Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 5.6k
Boxing Cache? #7079
Copy link
Copy link
Closed
Labels
area-VM-coreclrdesign-discussionOngoing discussion about design without consensusOngoing discussion about design without consensusin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Description
Metadata
Metadata
Assignees
Labels
area-VM-coreclrdesign-discussionOngoing discussion about design without consensusOngoing discussion about design without consensusin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Revisiting https://github.com/dotnet/coreclr/issues/111
Using repo example manged code; shows pre-cached boxes for common values can improve the performance of boxing (see below). Is there a way of building this into the jit or runtime?
Or is this just madness?
Integer Box Caching
Boolean Box Caching
Suggestion, cache boxes for:
bool: true, falue
byte: 0 to 255
char: 0 to 127
int/short: -128 to 127
Maybe others?
Gave it a go benaadams/coreclr@2f7726d, but not entirely sure what I'm doing, so you probably have a bunch of really weird Dr Watson reports...
Edit Updated with metrics post https://github.com/dotnet/coreclr/issues/8423#issuecomment-264500921