Re: Can you write code directly in CIL ???



I will second that the C++ compiler is better at optimizing IL output
than the C# compiler. However, as Willy stated, it will not always produce
verifiable code... I believe the article you were looking for is in MSDN
magazine.

But as a general statement, the C++ compiler generally has the best
optimizations (and for unmanaged code, with the new profile-guided
optimization, it's even cooler).

--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> wrote in message
news:MPG.1e1b36c8c5e95e598cbe2@xxxxxxxxxxxxxxxxxxxxxxx
> Abubakar <abubakarm@xxxxxxxxx> wrote:
>> > It's a shame I can't find the newsgroup thread I'm thinking about - I
>> > could give it a try with C# 2.0...
>>
>> btw what search engine are you using? It maybe socking for some people
>> but
>> few days back I was searching some thread and for the same keywords
>> google
>> could not find the post but msn search (search.msn.com) did :)
>
> groups.google.com, which is what I always use for newsgroup posts.
> (Note: not just "web google".) It'll be there somewhere, but I just
> can't find it at the moment...
>
> --
> 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: "Sorting" assignment
    ... too slow, other times for optimizing too much, some times for being too ... That is a rather bizarre, not-quite-C compiler, but ok. ... The overlap issue is a different problem, but performing a "swap" on ... CPU hardware feature differences that can be incredibly important to ...
    (comp.programming)
  • Re: Why INFINITE loop in a thread occupy so much CPU time??
    ... measuring code quality or program efficiency. ... You stated the K&R compiler did the silly thing of testing ... In debug mode, nothing, repeat nothing, matters. ... my Ph.D. is in optimizing compiler technology. ...
    (microsoft.public.vc.mfc)
  • Re: Compiler code optimization: see code below
    ... >>I'm writing some C to be used in an embedded environment and the code ... I'm using GCC for the workstation and Diab compiler for the ... >>sure what exactly a good optimizing compiler can optimize away. ... > Neither optimization nor efficiency is defined by the C standard. ...
    (comp.lang.c)
  • Re: How about this syntactic candy?
    ... Unless the code in the loop is so simple that it is guaranteed that the list.Count property won't change during the execution of the loop, optimizing the expression to avoid reevaluating list.Count would be wrong. ... I once saw a demo of a for loop all compressed into one line with ingenious shortcuts and contractions, and after the optimising compiler had been through it, it generated EXACTLY the same machine code as an alternative loop written out in full. ... In that case, I could see the utility in providing the compiler with an explicit statement to that effect, but it seems to me that the current method required is so easy and simple, I can't imagine the point in adding something extra to the language to support the behavior. ...
    (microsoft.public.dotnet.languages.csharp)
  • amd64 bitops fix for -Os
    ... filesystem, the kernel mostly hangs. ... When optimizing for speed, the generated code is such that the flags ... Obviously the asm statement must not rely on the compiler setting up ... -inline long find_first_zero_bit(const unsigned long * addr, ...
    (Linux-Kernel)

Loading