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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top