O
Olaf Baeyens
Something for the C#/JIT wishlist.
I am looking at the generated IL Assembler code and the generated real x86
code and I am facinated about the quality of the generated code. It comes to
near c++ generated code without optimizing. The same type of code that you
would have if you use the VC 2003 C++ standard edition, that has no code
optimizer.
I do understand that optimizing this code in the JIT would be possible but
would also slow down the loading iof the program, so a balance must be
chosen that has the right amount of optimizing and the right amount of
loading time.
Now, I propose to add one new keyword to C# that could tell that this
particular method might be optimized much further even though it takes more
time to load. This would be nice, since not all methods must me optimized,
but only a few of them.
In my case I am using OpenGl to render a scene using C#, since OpenGl is
doing the rendering stuff, it does not matter that the code is a little
slower. But one part must convert a bitmap to a texture using the unsafe
keyword. This is just a small loop swapping bytes and adding a alpha
channel, and this part could be optimized further by a JIT in my opinion.
I am looking at the generated IL Assembler code and the generated real x86
code and I am facinated about the quality of the generated code. It comes to
near c++ generated code without optimizing. The same type of code that you
would have if you use the VC 2003 C++ standard edition, that has no code
optimizer.
I do understand that optimizing this code in the JIT would be possible but
would also slow down the loading iof the program, so a balance must be
chosen that has the right amount of optimizing and the right amount of
loading time.
Now, I propose to add one new keyword to C# that could tell that this
particular method might be optimized much further even though it takes more
time to load. This would be nice, since not all methods must me optimized,
but only a few of them.
In my case I am using OpenGl to render a scene using C#, since OpenGl is
doing the rendering stuff, it does not matter that the code is a little
slower. But one part must convert a bitmap to a texture using the unsafe
keyword. This is just a small loop swapping bytes and adding a alpha
channel, and this part could be optimized further by a JIT in my opinion.