Was the time the JITer takes to instantiate the generic type taken into consideration?
-Brock > -----Original Message----- > From: Discussion of advanced .NET topics. [mailto:ADVANCED- > [EMAIL PROTECTED] On Behalf Of Sébastien Lorion > Sent: Wednesday, February 28, 2007 4:39 PM > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > Subject: Re: [ADVANCED-DOTNET] Why is Activator.CreateInstance<T>() so > much slower than CreateInstance(type) ? > > Ok, makes sense... But the question of Frans then remains unanswered. > Without measuring, I would also have guessed that the generic version > would be faster. > > S�bastien > www.sebastienlorion.com > > On 2/28/07, Barry Kelly <[EMAIL PROTECTED]> wrote: > > Barry Kelly <[EMAIL PROTECTED]> wrote: > > > > > Your results appear to be anomalous because typeof(T) where T is a > > > non-public type invokes more security checking. I get the following > > > results: > > > > Oops: I meant Activator.CreateInstance(typeof(T)) invokes more > checking, > > not typeof(T), where T is non-public. > > > > -- Barry > > > > -- > > http://barrkel.blogspot.com/ > > > > =================================== > > This list is hosted by DevelopMentor(r) http://www.develop.com > > > > View archives and manage your subscription(s) at > http://discuss.develop.com > > > > > -- > S�bastien > www.sebastienlorion.com =================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com