Custom ArrayList and object casting...

wyrd

Senior Contributor
Joined
Aug 23, 2002
Messages
1,405
Location
California
I was looking into making a custom ArrayList so I didn't have to cast values in the ArrayList from object to whatever they really were, and noticed there was a nice CollectionBase. Unfortunately the InnerBase is of object, and I'd still need to do casting.

So, my question is this.. should I be worried about the speed of casting? For a game, that is. I was thinking of just writing up my own custom ArrayList (or well, Linked List) so I wouldn't have the overhead of casting. I'm only doing at most 100 casts per second, but I'm afraid with all the other calculations it could lead into a slight dip in FPS (maybe only a few, but every little one counts!)

Any thoughts?
 
Back
Top