Static vs Non-Static Function Performance

  • Thread starter Thread starter Steve - DND
  • Start date Start date
Hi andrew,
Try to see what most of the static members do:
1. Static properties are readonly
2. Static methods doesn't use any other static variables and almost never
modified their arguments (some of them do like Array.Copy).

In this case you don't have to do any locking to ensure the thread safety.
Anyway if they need to do locking they will, but this is realy unlikely.


B\rgds
100
 
100 said:
Hi andrew,
Try to see what most of the static members do:
1. Static properties are readonly
2. Static methods doesn't use any other static variables and almost never
modified their arguments (some of them do like Array.Copy).

In this case you don't have to do any locking to ensure the thread safety.
Anyway if they need to do locking they will, but this is realy unlikely.

Yes i know :) i was trying to illustrate how the myth was being perpetuated

andrew
 
Back
Top