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




"Peter Olcott" <olcott@xxxxxxx> wrote in message
news:0izsf.38049$QW2.32014@xxxxxxxxxxxxx
>
> "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx> wrote in message
> news:ezbs6U5CGHA.2292@xxxxxxxxxxxxxxxxxxxxxxx
>>
>> "Peter Olcott" <olcott@xxxxxxx> wrote in message
>> news:g8ksf.38005$QW2.12382@xxxxxxxxxxxxx
>>>
>>> "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx> wrote in message
>>> news:%233iWaovCGHA.1032@xxxxxxxxxxxxxxxxxxxxxxx
>>>>
>>>> "Peter Olcott" <olcott@xxxxxxx> wrote in message
>>>> news:IEbsf.37965$QW2.18916@xxxxxxxxxxxxx
>>>>>
>>>>> "Abubakar" <abubakarm@xxxxxxxxx> wrote in message
>>>>> news:%23tiR4prCGHA.3820@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>> Hi,
>>>>>>> Cab you write code directly in the Common Intermediate language? I
>>>>>>> need to
>>>>>>> optimize a critical real-time function.
>>>>>>
>>>>>> ofcourse you can, by now you may even have done it. Just write few
>>>>>> *.il
>>>>>> lines and pass it to ilasm (that comes with the sdk) and you'll get
>>>>>> the
>>>>>> managed binary.
>>>>>>
>>>>>> although Nicholas tried explaning. I have just few things to add.
>>>>>>
>>>>>> 1- If you look at the shared source implementation of .net, ie, SSCLI
>>>>>> (aka
>>>>>> ROTOR), you wont find a single *.il file that microsoft devs had to
>>>>>> write in
>>>>>> order to acheive better performance. The max they did to write fast
>>>>>> code as
>>>>>> a .net code was to write the unsafe C# code (which uses pointers).
>>>>>> Beyond
>>>>>> that, places that needed to get maximum efficiency like JIT, they
>>>>>> used a
>>>>>> pure c++ code and in very few places, x86 assembly code was used. I
>>>>>> think if
>>>>>> those developers could acheive anything significant by writing il
>>>>>> directly,
>>>>>> they would have done that.
>>>>> What I had in mind was to write the best possible code in C++ and have
>>>>> the best compiler translate this into assembly language. The best
>>>>> compiler so far seems to be Visual C++ 6.0. Some of the optimizations
>>>>> in 7.0 are disabled, in particular function inlining. Then I was going
>>>>> to hand tweak this generated assembly language. Then as a final step I
>>>>> was going to translate this into CIL.
>>>>>
>>>>>> 2- C# compiler is as clever in generating msil as anyone can possibly
>>>>>> get. I
>>>>> False assumption when one examines the benchmarks of managed C++
>>>>> against managed C#, Managed C++ does significantly better in at least
>>>>> some cases.
>>>>>
>>>>
>>>> Not sure where you get this from? Did you actually run such benchmarks?
>>>> I did run many benchmarks, since v1.0 comparing both C# and Managed C++
>>>> (and C++/CLI) and I never saw a delta (yes, for some C# is the winner)
>>>> larger than 5%, using v2 they are even smaller.
>>>>
>>>>
>>>>
>>>> Willy.
>>>>
>>>>
>>> I found it on the web, some of the differences were several-fold. I
>>> don't know which versions.
>>
>> Well, they were wrong, for sure, Please post the URL's where you found
>> this kind of nonsense.
>>
>> Willy.
>
> The difference between VC++ 6.0 and VC++ 7.0 is 50%. The older compiler
> produces much better code.

Ok, now you are again comparing C++(6.0) to C++ (7.1) while previously you
were comparing C++ to C#.
But also this one is one of your claims you can't (or are not willing?)
prove, anyway if it's true I would suggest you to file a bug report
(http://lab.msdn.microsoft.com).
I can prove that the newest C++ compiler produces equal or better (faster)
code than VC6.

Willy.


.



Relevant Pages

  • Re: Compiler version not supported by Windows DDK
    ... compile it using VC6 and the new WinXP DDK. ... Am sure someone else in the group would know the exact compiler version ... Prev by Date: ...
    (microsoft.public.development.device.drivers)
  • Re: About C++ IDEs
    ... VC6 is more than an IDE and I didn't talk about the IDE. ... The compiler in VC6 is fine. ... What's wrong with C or even assembler? ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Give me reasons not to use Delphi
    ... button to press to file an e-mail bug report to Microsoft The beta versions ... If want to report a compiler generated bug to Microsoft then you can ... To set this compiler option in the Visual Studio development environment ... This compiler option is unavailable in Visual Studio. ...
    (borland.public.delphi.non-technical)
  • Re: Problems with GetOpenFileName and GetSaveFileName
    ... > OK I've tested your program with VC6 SP6. ... what version of the Platform SDK are you using? ... even offered them free upgrades to 98SE but they didn't go for it). ... > SDK installed and available to the VC compiler.. ...
    (microsoft.public.win32.programmer.ui)
  • Re: fatal error LNK1103: Debug-Informationen beschaedigt
    ... Der Compiler ist so mies gegen alle seine Nachfolge, dass ich jedes Beharren darauf als nicht gerechtfertigt ansehe. ... Das ist meine ganz persönliche Meinung, die alle meine Entwicklerkolegen bei mir in der Firma jedoch alle teilen. ... Zudem sind die Flyouts noch platzsparender und erlauben noch mehr vom Code zu sehen! ... Ich arbeite zwar produktiv immer noch mit VS2003 aber jedesmal wenn ich mit VC6 noch irgendeinen Legacy Kram bei uns pflegen muss treibt mich der Compiler zu Wahnsinn... ...
    (microsoft.public.de.vc)