Is there a noticeable perf difference between using stack vs array in C#?
-
-
Replying to @DaveVoyles
@DaveVoyles depends. Resizing an array is expensive. For a stack it doesn't, since I think it uses pointers internally (unlike Dictionary)1 reply 0 retweets 0 likes -
Replying to @mattdkerr
@kunikos Thank you. I looked into it a bit more, and for my purpose (object pooling for bullets), a stack works fine1 reply 0 retweets 0 likes -
Replying to @DaveVoyles
@DaveVoyles alternatively there's Queue; I think FIFO may be closer to behavior you want for created bullets right?1 reply 0 retweets 0 likes
Replying to @mattdkerr
@kunikos It's all the same thing to me, really. In JS I was always using arrays (hence, no queue or stack), but either should work here
12:21 PM - 9 Mar 2014
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.