Re: Can you write code directly in CIL ???
Peter Olcott <olcott@att.net > wrote:[color=blue][color=green]
> > How much more performance do you need? Have you tried doing the
> > conversion and seeing how it performs *without* tweaking?[/color]
>
> The fastest algorithm with the best compilation just barely meets my target.
> This is with MS Visual C++ 6.0. The project requirements call for a .NET
> component. If I could double the speed of this I would be very pleased. In any
> case more recent compilers do not meet my target even with the best algorithm,
> so I must do at least as well as the best compiler. This should only be a matter
> of translating the generated assembly language from the best unmanaged code into
> CIL.[/color]
No - because CIL looks pretty different from assembly language, and
even if you generated similar-looking CIL somehow, there's no guarantee
that would then be JITted to the same assembly code.
The performance improvement you'll get from this step, if any, is
likely to be tiny (don't hang on to the idea of doubling the speed -
that was a very particular case) and an awful lot of work. I'd do the
initial conversion to C# and benchmark that *first*.
--
Jon Skeet - <skeet@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Peter Olcott <olcott@att.net > wrote:[color=blue][color=green]
> > How much more performance do you need? Have you tried doing the
> > conversion and seeing how it performs *without* tweaking?[/color]
>
> The fastest algorithm with the best compilation just barely meets my target.
> This is with MS Visual C++ 6.0. The project requirements call for a .NET
> component. If I could double the speed of this I would be very pleased. In any
> case more recent compilers do not meet my target even with the best algorithm,
> so I must do at least as well as the best compiler. This should only be a matter
> of translating the generated assembly language from the best unmanaged code into
> CIL.[/color]
No - because CIL looks pretty different from assembly language, and
even if you generated similar-looking CIL somehow, there's no guarantee
that would then be JITted to the same assembly code.
The performance improvement you'll get from this step, if any, is
likely to be tiny (don't hang on to the idea of doubling the speed -
that was a very particular case) and an awful lot of work. I'd do the
initial conversion to C# and benchmark that *first*.
--
Jon Skeet - <skeet@pobox.co m>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Comment