Re: Boxing and Unboxing ??

Tech-Archive recommends: Fix windows errors by optimizing your registry




"Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> wrote in message
news:MPG.2013ef07f49fb38498d7ad@xxxxxxxxxxxxxxxxxxxxxxx
Peter Olcott <NoSpam@xxxxxxxxxxxxx> wrote:

<snip>

It is good to know that aggregate data can be passed by reference without the
boxing and unboxing overhead, if need be.

Normally aggregate data is stored in a reference type to start with,
where there's no boxing penalty anyway.

Last time you were concerned with the performance penalty of boxing and
unboxing, we proved that in the benchmark you were worried about, the
cost of boxing and unboxing was negligible. Now, do you have a
different evidence-based reason for worrying about the penalty? If not,
I'd suggest you get some more experience (and start profiling) before
worrying about it any more.

I want to fully understand exactly how the underlying architecture works so that
I can design it from the ground up using the best means. With C++ I already know
exactly what kind of machine code that anything and everything will translate
into. I need to acquire this degree of understanding of .NET before I begin
using it.

The systems that I am developing are not business information systems where
something can be 10,000-fold slower than necessary and there is no way for
anyone to notice the difference. In some cases a two-fold difference in the
speed of an elemental operation can noticeably effect response time. I am not
comfortable switching to C# until I know every detail of exactly how to at least
match the performance of native code C++.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


.



Relevant Pages

  • Re: Boxing and Unboxing ??
    ... something can be 10,000-fold slower than necessary and there is no way for ... In some cases a two-fold difference in the ... But, without evidence, you seem obsessed with boxing and unboxing. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Boxing and Unboxing ??
    ... boxing and unboxing overhead, if need be. ... where there's no boxing penalty anyway. ... worrying about it any more. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: advantage of boxing and unboxing
    ... The only cases in which boxing / unboxing is likely to cause problems ... Garbage collector costs to reclaim the box when it's no longer ... resources, would something as simple as the following take alot of ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Roll your own std::vector ???
    ... dynamic collection that doesn't use any boxing or ... unboxing. ... public IEnumeratorGetEnumerator() ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Roll your own std::vector ???
    ... dynamic collection that doesn't use any boxing or ... unboxing. ... public IEnumeratorGetEnumerator() ...
    (microsoft.public.dotnet.languages.csharp)