Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

Gamer extraordinaire. Programmer wannabe.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...