Blogroll Me!

Lives in India/Chennai/Chennai, speaks English.
This is my blogchalk:
India, Chennai, Chennai, English.

A blog on what is happening in the .NET world in India.  

Anand's .NET WebLog

Home Archives Contact

Monday, March 10, 2003 :::

I was just tinkering around with code and IL and I was pleasently suprised at the amount of optimizations that the compilers do when converting your code into IL. I was just playing around with strings in VB and I had due to the usual crazy pattern that you use when doing R&D code came up with something like this.

a = "String 1" + "String 2" + b

where b was another string. When I looked at the code, I found that the compiler had converted this code into

a= "String 1String2" +b --> this the logical equivalent and not the real IL...:-)

That is pretty cool optimization as this can save a lot of overheads in string concat if U end up writing such bad code..:-)

::: posted by Anand at 4:28 PM

Comments: Post a Comment

Subscribe to Anand's .NET WebLog!

powered by Bloglet

Listed on Blogwise Listed on BlogShares Technorati Profile

Powered by Blogger