{"action":"opened","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/1043","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/1043/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/1043/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/1043/events","html_url":"https://github.com/dotnet/coreclr/issues/1043","id":79491598,"number":1043,"title":"Reuse temporaries for every new by default","user":{"login":"atlaste","id":1618179,"avatar_url":"https://avatars.githubusercontent.com/u/1618179?v=3","gravatar_id":"","url":"https://api.github.com/users/atlaste","html_url":"https://github.com/atlaste","followers_url":"https://api.github.com/users/atlaste/followers","following_url":"https://api.github.com/users/atlaste/following{/other_user}","gists_url":"https://api.github.com/users/atlaste/gists{/gist_id}","starred_url":"https://api.github.com/users/atlaste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atlaste/subscriptions","organizations_url":"https://api.github.com/users/atlaste/orgs","repos_url":"https://api.github.com/users/atlaste/repos","events_url":"https://api.github.com/users/atlaste/events{/privacy}","received_events_url":"https://api.github.com/users/atlaste/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-22T15:13:57Z","updated_at":"2015-05-22T15:13:57Z","closed_at":null,"body":"The behavior of what went wrong is described in quite some detail (including a detailed analysis by Mark Segal) on http://stackoverflow.com/questions/30383178/weird-stackoverflow-in-c-sharp-when-allocating-reference-types .\r\n\r\nI do believe this could seriously impact performance, specifically: I think this could hurt JIT register allocation.\r\n\r\nJIT disables the optimizer when the method code size is too big. Limits are found on : https://github.com/dotnet/coreclr/blob/01a5e9b4580cf6ea21de672f627402c30658ef22/src/jit/compiler.h#L7131 . JIT allocates a new temp for every new by default: https://github.com/dotnet/coreclr/blob/01a5e9b4580cf6ea21de672f627402c30658ef22/src/jit/importer.cpp#L11108 . It would be nice to reuse the temp when the optimizer is disabled."}}