I have a situation where I should track the FIRST changes applied to a field. This thing applies to "some" (10 if I'm not wrong) fields of a struct which I need to be as efficient as possible (it's a struct that will be intensively used to communicate information between threads for rendering/updating data; it's a message passing struct basically).
In this case I'm talking about xbox .net compact framework, I've heared that properties have performance issues because they are not inlined, so my question is:
What's the best way to face this situation?
2 Ideas:
1) I keep track of the first change done to a field, so I use a property that will automatically set a bit field to 1 to say "I've been changed!" (this bit field is part of a single int, so it's only a 4 byte overhead), but I'will waste all other calls to this property because they will simply change the value, because the bit is already set (until next frame obviusly)
2) I manually keep track of the change of the field (which will be public so), setting the bit with my own hands (more error possibilities but optimized)
Thanks for any suggestion
As rsenna stated, the only solution I found is staying with public fields or work with functions without worring so much about slow execution. There isn't a solution for this