POV-Ray : Newsgroups : povray.off-topic : Learning C# : Re: Learning C# Server Time
29 Jul 2024 04:20:13 EDT (-0400)
  Re: Learning C#  
From: Orchid Win7 v1
Date: 29 Sep 2012 17:28:03
Message: <506767e3$1@news.povray.org>
On 29/09/2012 06:40 PM, Darren New wrote:
> On 9/29/2012 3:18, Orchid Win7 v1 wrote:
>> This, it is claimed, can reduce page faults, improve cache
>> performance, and so forth.
>
> The author doesn't understand the concept of "working set".

The author claims that if you never try to print anything, the code for 
doing printing will never be JIT-compiled, thereby resulting in a 
smaller working set.

 From what you're saying, if that code is already compiled to machine 
code but just never /runs/, then it won't increase the working set 
anyway. (Unless it causes the running code to span more VM pages.)

>> Yeah, that's about the size of it.
>
> Nah. I'm pretty sure C# generics use the same code for each reference
> type. I.e., you might have a version for int, a version for float, and
> one version for anything descended from Object.

Sure. I meant in the C++ case.

> The reason C++ makes more code is that it actually does stuff like
> inline the right calls, doing type-specific generic expansions. C#
> doesn't do that, so I think you get far fewer versions of the code.
> Especially for generics that are anchored, i.e., that are generic over
> some specific superclass.

And Haskell generates one version of the code, and lets you request 
specific versions if you want them.

Oh, wait...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.