I just tried a test loop to add an array of 64 million 16-bit signed integers into an array of 32-bit signed integers. This is to get an idea of how long a signal averaging (summing, actually) thing might take on a Pentium based SBC.
On my HP winXP desktop, writing a very dumb PowerBasic loop...
FOR Y = 1 TO 10
FOR X = 1 TO 64000000 S(X) = S(X) + A(X) NEXT NEXT (where X, Y, and S() are longs)
this takes 2.25 seconds, or 0.225 seconds to do the 64M sum. That's
3.6 nanoseconds per loop iteration.I could rewrite this using pointers and it might be faster.
We tried it on a Kontron MiniITX SBC, in C, with pointers, Linux but with a wimpier processor, and got about the same run time.
We'll acquire 64M samples once a second or so, so the signal averaging doesn't look like a showstopper. I was impressed.
There may be some MAC/array instructions buried in the x86 architecture that might be even faster.
John