Derivative calculation I have a series of data (single array). If I take this data and plot it, I can see that there are multiple peaks. However If I zoom in to a section of data, I see that there is substantial noise.  

I like to detect how many peaks in the data using little CPU time and energy. I thought of detecting the slopes of these peaks (could be sharp or smooth rising or falling) and look at the number of slopes to determine the number of peaks. (2 slopes positive and negative for every peak)

Any pointers how I can calculate the slopes in the presence of noise? 

The code will go into an embedded system, memory is limited so preferably I like to implement something that doesn't require any significant data copy.
It depends on the type of noise and type of signal.  Show an example if you want a good answer.  But, that said, in general you probably want to low-pass filter the signal.  If I were you, I'd take a Fourier power spectrum to see if most of the noise is high frequency, and the signal I care about mostly in a lower range.  If they overlap, oh well that's life. I would have to think more about things.

One low-pass filter that's good for noisy signal in many cases is the Savitzky-Golay filter.  It is described in Numerical Recipes, and for Python there's a function in the Python Numpy Cookbook.  It is merely a convolution with a small kernel.   You pick the window size based on the width of the peaks or other features, wide enough to mush out the noise, but not wider than the features.  It can be small, say five points, or bigger like dozens, a hundred maybe.  

You also pick a polynomial order - usually I use 2 or 4.  Order 2 is fine for when the window is small, &lt; 10 points or it spans less than half a cycle or so (if your signal resembles a sine) while order 4 is better at matching distorted peak shapes, but likes to have around 9 or more points.  But a lot depends on the shape and frequency of the noise.

As other say in the comments, finding derivatives probably isn't the best strategy, but if you want find derivatives anyway, the Savitzky-Golay filter can do that - simultaneously smoothing and reporting the derivative instead of the signal.