Re: Use DSP for heavy floating-point calculation



Jack Huang wrote:

Hi All,

I'm writing a program for stock trading simulation to verify something.
But it will take 400 days for a simulation in my notebook (Centrino
1.6G).
Big part of my program is floating point calculation/compare.
My idea is transfer the loading to DSP but I'm not sure this idea is
OK.

Thanks for your suggestion.

Jack

Some of the responses touched on this, but I don't think any of them really spelled it out (my apologies if I missed it):


The classic DSP problem is one where you can reduce your algorithm down to a bunch of vector dot products, to take advantage of the single-cycle multiply and accumulate capability of the DSP.

You mentioned that you are doing a bit of math and then a compare -- DSP chips are no better than 'regular' chips if the algorithm has a lot of branching. Where DSP chips shine is in executing a bunch of near-identical calculations. I suspect that you'll be disappointed with a DSP chip.

I second all the suggestions for hand-optimized C (or C++). Just porting the code to C++ should speed things up, then you should expect to have significant room for improvement from there. If you could vectorize the calculations, and separate the decisions from them, then doing the problem in SciLab or MatLab would probably be orders of magnitude faster than in VB -- both of those programs are optimized for vector operations but suck at 'for' loops.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
.



Relevant Pages

  • Re: NBFM from DDS chip
    ... small DSP chips ... > Wescott Design Services ... I wouldn't be surprised if this wasn't the algorithm used in DSP generation ...
    (sci.electronics.design)
  • Re: Multiply and Accumulate
    ... wondered if anyone knew if the Intel Pentium has a "MultiplyAndAccumlate" ... instruction as found in DSP chips. ... AFAIK the SSEx for the floating point calculations: ...
    (borland.public.delphi.language.basm)