IL Question
-
By Microsoft's own admission, the C# compiler is not much of an optimizer. I need to get a particular class working blazing fast, so I'm using ildasm to get the IL, modifying it and ilasm-ing it back to a PE. I need to know what's a faster way to push two references to the current object onto the stack: ldarg.0 ldarg.0 OR ldarg.0 dup Thanks
-
By Microsoft's own admission, the C# compiler is not much of an optimizer. I need to get a particular class working blazing fast, so I'm using ildasm to get the IL, modifying it and ilasm-ing it back to a PE. I need to know what's a faster way to push two references to the current object onto the stack: ldarg.0 ldarg.0 OR ldarg.0 dup Thanks
I'm going to ask a dumb question: If you're requiring performance only, why not go for C++ (or even inline C) ? I don't see the benefit of doing IL manually. Cheers, Simon "Every good work of software starts by scratching a developer's personal itch.", Eric S. Raymond
-
I'm going to ask a dumb question: If you're requiring performance only, why not go for C++ (or even inline C) ? I don't see the benefit of doing IL manually. Cheers, Simon "Every good work of software starts by scratching a developer's personal itch.", Eric S. Raymond
After disassembling the Managed C++ code, I realized that I can optimize it better than the compiler. However, the MC++ included some native code which can't be disassembled with ildasm so I can't compile it with ilasm. Besides, since the stuff is managed, it doesn't really matter what language I write in; I like C#.
-
By Microsoft's own admission, the C# compiler is not much of an optimizer. I need to get a particular class working blazing fast, so I'm using ildasm to get the IL, modifying it and ilasm-ing it back to a PE. I need to know what's a faster way to push two references to the current object onto the stack: ldarg.0 ldarg.0 OR ldarg.0 dup Thanks
-
By Microsoft's own admission, the C# compiler is not much of an optimizer. I need to get a particular class working blazing fast, so I'm using ildasm to get the IL, modifying it and ilasm-ing it back to a PE. I need to know what's a faster way to push two references to the current object onto the stack: ldarg.0 ldarg.0 OR ldarg.0 dup Thanks
And since you are interested in Il, check the Ecma-335 specificationthat deals with the Commom Language Infrastructure, in which IL instruction set belongs, here Common Language Infrastructure Cheers, Joao Vaz The loved ones never really leave us , they are always alive on our hearts and minds.
-
After disassembling the Managed C++ code, I realized that I can optimize it better than the compiler. However, the MC++ included some native code which can't be disassembled with ildasm so I can't compile it with ilasm. Besides, since the stuff is managed, it doesn't really matter what language I write in; I like C#.
I think it does. Only memmory is managed, but the Managed C++ code is more optimized that C#, actually I think is the only optimized language from .NET. Also with managed you can combine managed and unmanaged code so you can obtain native code for real time actions. Best regards, Alexandru Savescu
-
I think it does. Only memmory is managed, but the Managed C++ code is more optimized that C#, actually I think is the only optimized language from .NET. Also with managed you can combine managed and unmanaged code so you can obtain native code for real time actions. Best regards, Alexandru Savescu
Could you direct me to where ms says mc++ is more optimized? I cant seem to find reference to that.
-
By Microsoft's own admission, the C# compiler is not much of an optimizer. I need to get a particular class working blazing fast, so I'm using ildasm to get the IL, modifying it and ilasm-ing it back to a PE. I need to know what's a faster way to push two references to the current object onto the stack: ldarg.0 ldarg.0 OR ldarg.0 dup Thanks
I don't think there will be any observable difference between the two. I will really be surprised if your hand optimization gives you more speed than the unoptimized code. I have never wasted time worrying about such insignificant things. Keep your eye upon the donut and NOT upon the hole. - Bill Sergio about posting in the right forum. The Lounge - June 23, 2002