YaK:: WebLog #535 Topic : 2007-06-27 05.48.56 matt : C#/CLR question : does the readonly keyword help the JIT at all? [Changes]   [Calendar]   [Search]   [Index]   [PhotoTags]   
  [Back to weblog: pretention]  
[mega_changes]
[photos]

C#/CLR question: does the readonly keyword help the JIT at all?

After scouring books and blogs, I can't find a real answer to this question: does the readonly keyword in C# help the JIT optimize better at all?


I looked in the CLR via C# book. I looked in .NET 2.0 IL assembler book. I searched blogs.

The books had nothing to help, which is strange because they are great resources on what kind of code can help the JIT do a better job. The blogs I found by searching for "C# readonly JIT" have hyperbole, but nothing definite.

Can anyone tell me, or do I need to pre-JIT an assembly with ngen and look at the generated x86 code?

Discussion:

showing all 0 messages    

(No messages)

>
Post a new message:

   

(unless otherwise marked) Copyright 2002-2014 YakPeople. All rights reserved.
(last modified 2007-06-27)       [Login]
(No back references.)