DUE ADC Read Value Stability

Taking the samples in such quick succession on a Due means you're sampling at way more than 1 kHz. You'll still experience the full joy of line noise.

This method works great on my Due, however I do understand it would depend on the nature of the "noise". If it's just switching noise, no problem. If it's say the 3rd harmonic of the line frequency (or similar), then it would be easy to modify the function to include a non-blocking interval between readings and to only sort after "n" readings. Also a non-blocking interval between function calls could be included.
There's nothing like an oscilloscope image to get a true picture.