Skip to main content
recover broken imageshack image from source article
Source Link
Ilmari Karonen
  • 8.4k
  • 1
  • 31
  • 39

You really shouldn't need to worry about this unless you are doing this millions and millions of times per frame. This graph shows some empirical data about the speed of casting:

Casting Speeds http://img707.imageshack.us/img707/5835/casta.png

http://www.codeproject.com/KB/cs/csharpcasts.aspxCasting Speeds
Source: "Type casting impact over execution performance in C#" by Emilio Guijarro, 2004

Keep in mind that there are about 17 milliseconds per frame at 60 frames per second, and about 33 milliseconds at 30 frames per second.

You really shouldn't need to worry about this unless you are doing this millions and millions of times per frame. This graph shows some empirical data about the speed of casting:

Casting Speeds http://img707.imageshack.us/img707/5835/casta.png

http://www.codeproject.com/KB/cs/csharpcasts.aspx

Keep in mind that there are about 17 milliseconds per frame at 60 frames per second, and about 33 milliseconds at 30 frames per second.

You really shouldn't need to worry about this unless you are doing this millions and millions of times per frame. This graph shows some empirical data about the speed of casting:

Casting Speeds
Source: "Type casting impact over execution performance in C#" by Emilio Guijarro, 2004

Keep in mind that there are about 17 milliseconds per frame at 60 frames per second, and about 33 milliseconds at 30 frames per second.

Source Link
Sean James
  • 3.5k
  • 2
  • 31
  • 24

You really shouldn't need to worry about this unless you are doing this millions and millions of times per frame. This graph shows some empirical data about the speed of casting:

Casting Speeds http://img707.imageshack.us/img707/5835/casta.png

http://www.codeproject.com/KB/cs/csharpcasts.aspx

Keep in mind that there are about 17 milliseconds per frame at 60 frames per second, and about 33 milliseconds at 30 frames per second.