Analog read maximum frequency and moving average ?

I know most of analog reads at about 10u, but I am using the SAMD21, and I couldn’t find the maximum frequency to measure.

Anyway, my problem is related mostly to software approach, since I dont have to really get the signal, but to find its maximum average value over lets say 100 periods.

So, if I think about it, if I read the analog in as fast as possible within 100 cycles of a sine/square input, I get a time equals to:

Time to measure=100/3Mhz= 33us

within this time for a 10us analogReader(I probably have a faster one), I can get 3 reads.

So first, am I missing something here ?
Second,whats my best approach to that? just delay and read the analog ? what delay should I use ?

       float voltage = analogRead(A1) * 3.3 / 4096.0;

I would stay away from using "delay()" especially in time sensitive circumstances. check out the blinkwithoutdelay example. it shows you how to use millis() to time things. Very helpful and doesn't keep other parts of the code from doing things.