JoeDalton, about the cost of regular assignments versus reflection:
Many people have different numbers on this, the simple reason being that they don't test the same thing. A call to FieldInfo.SetValue is only about 6 to 8 times more expensive. A call to Type.Invoke to do the same thing is significantly more expensive, as more reflection is involved.
If you look at the code, the test in the article you've mentioned doesn't compare regular assignments to SetValue, it compares them to GetType + reflecting on that type to find the fields we want to update + SetValue. In many cases, the first two can be amortized by using a simple cache.
Many people have different numbers on this, the simple reason being that they don't test the same thing. A call to FieldInfo.SetValue is only about 6 to 8 times more expensive. A call to Type.Invoke to do the same thing is significantly more expensive, as more reflection is involved.
If you look at the code, the test in the article you've mentioned doesn't compare regular assignments to SetValue, it compares them to GetType + reflecting on that type to find the fields we want to update + SetValue. In many cases, the first two can be amortized by using a simple cache.