views:

87

answers:

1

All, I need a high speed stack on a .Net CF platform (ARM chip). Does anyone know if the standard (managed) queue classes work well enough for what I describe below? Anyone got an idea on how fast they are? If I do not used managed memory classes what should I use?

The stack will need a maximum size (in megabytes ... 10 or 20 ... so memory on the heap, probably?) and items pushed onto the stack will mean older items on the stack now beyond the maximum size will pop off (I don't care about the old data). The Arm chip proposed is a good one ... but I am looking at about 5 megabytes a second.

The stack, once populated, will be read on a First In First Out (FIFO) basis (so, in that sense, it is a queue).

And I need to be able to peek into the stack to fetch copies of blocks of the data.

So it acts as a buffer (for the last 2 seconds of data) until the user declares an interest when the data is recorded for posterity ...

Thanks!

Aidanapword

+1  A: 

The standard generic queue is quite fast. There's no way for us to tell you if it's fast enough for your needs, as we have no idea what your harward will be capable of or what sort of data you'll be using. If they're not fast enough (you're going to have to test this on your real target hardware) then I'd probably look at making a custom circular buffer implementation using a memory-mapped file. You're not going to get any faster than that.

ctacke