What happens to data streamed - while code is under execution cycle

Hi -

Just to ensure my assumptions are not correct !!!!!

When Analog input is used - with sample rates greater than 20,000 samples/sec, and the samples values get processed under a statistic library, while the controller is executing the set of values ie., when it is inside a loop, what happens to data that are streamed? are they buffered or not stored?

Nope, to the bit bucket.

The Arduino ecosystem only provides a means of reading an analog input, on demand, it does not impose nor create any framework for the collection of data. You control when analog values are acquired and what is done with the resulting data. Data samples can be acquired in both time asynchronous and synchronous fashions, this behavior resides with your program design, not the Arduino hardware or software. You can queue data for later processing when the current program task finishes.

The big unknown is the time required by your non-data acquisition tasks - they must be able to process the data you've acquired before another dataset appears. Only when new arrives before old data is processed would there be potential data loss. As expected, you decide which data is discarded or ignored.

avr_fred - you clarified my apprehensions, new data samples arrive while the previous data is being processed, means I, need to queue up the data, I'm intending to use array, but the limitation of array of is 10000 values, in my application data streaming is at very high rate and 10000 values get filled-up in less than 1/2 of a second, is there way we can queue high occurrences of data

You appear to believe that you need to store lots of data, the basis for which has not been established.

How many analog readings constitute a dataset? A dataset arrives in what amount of time?

Can that data be processed and discarded before a new dataset arrives?

FWIW, the maximum array index is not 10,000.

It is 20000 samples/sec, I'm processing 7samples in one execution, execution of the loop is ~79ms.

I cannot imagine what you could possibly be doing with 7 bytes of data that require 7.3 million clock cycles to process.

No matter though, based on your statements, you have a significant processing bottleneck that will most likely will not be solved with an Arduino.