Such optimizations could be done only if the method never modifies the
structure.  Detecting this is easier with MSIL (though not trivial) than
with previous compilers.

-- arlie


-----Original Message-----
From: Unmoderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Srihari Angaluri
Sent: Friday, May 21, 2004 10:53 PM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Large structures

Doesn't it alter the whole semantics of value types if the implementation is
allowed to do "hidden" optimizations like these? For example, if the
compiler passes the struct by reference after a threshold size (let's say
more than 1MB), any modifications I make to the structure inside the method
will alter the actual parameter passed to the method, right? That clearly is
inconsitent with the semantics of value types..

Srihari

===================================
This list is hosted by DevelopMentorR  http://www.develop.com Some .NET
courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to