64bit Optimizations

64bit Optimizations

Old forum URL: forums.lhotka.net/forums/t/3787.aspx


fernandoacorreia posted on Friday, October 26, 2007

Scott Hanselman has a very interesting article on JIT optimizations:

Release IS NOT Debug: 64bit Optimizations and C# Method Inlining in Release Build Call Stacks

After reading it, specially the part about the many "secret" optimizations, and differences on 64-bit systems, I wonder if the suggested method of using "MethodImplOptions.NoInlining" will always guarantee that CanReadProperty() and PropertyHasChanged() will be able to locate the property name on the stack.

I'm inclined to follow rxelizondo's suggestion and use something like this:

public static readonly string PROP_START_TIME = “StartTime”;

What do you think?

JoeFallon1 replied on Friday, October 26, 2007

I never liked the idea of finding the name on the stack.

The trade off is supposed to be in maintainability but there are too many problems with the stack idea. Here is another potetnial issue.

I code gen my Properties so I use the String overload. Very simple. Risk free.

Joe

 

Copyright (c) Marimer LLC