Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!psuvax1!wuarchive!sdd.hp.com!news.cs.indiana.edu!arizona.edu!uazhe0.physics.arizona.edu!zazula From: zazula@uazhe0.physics.arizona.edu (RALPH ZAZULA) Newsgroups: comp.sys.next Subject: Why does my DSP seem so SLOW???? Message-ID: <1991Mar28.173226.488@arizona.edu> Date: 28 Mar 91 22:29:56 GMT Reply-To: zazula@uazhe0.physics.arizona.edu Distribution: usa,local Organization: U of Arizona Experimental Elementary Particle Physics - Tucson, Lines: 30 Nntp-Posting-Host: uazhe0.physics.arizona.edu News-Software: VAX/VMS VNEWS 1.3-4 Lines: 30 So I'm working on this neural-net problem and figure that the matrix multiplicatons I'm doing would be ideally suited for the DSP. I was curious just how much of a speedup I would get so I did a naive timing study using a modified /NextDeveloper/Examples/DSP/ArrayProcessing/matrix/matrix.c What I did was to loop over the DSPAPmtm call and the 'manual' calculation of the matrix-multiply and used time(3) to get the times. With a loop of 1000 iterations, the DSP takes 21 sec and the 030 takes 1 sec. What??? I said... So, maybe the loop got optimized out??? Nope. If I omit the -O qualifier *and* add the loop index to the matrix elements, thus insuring that the entire loop gets executed, I get the same results. So why does it appear that the DSP is running 20 (twenty) times slower than the 030/math-chip combo? NOTE that I did not include the DSPAPWrite/ReadFloatArray calls in the timing loop. These are documented by NeXT as being inefficient. Ralph |----------------------------------------------------------------------| | Ralph Zazula "Computer Addict!" | | University of Arizona --- Department of Physics | | UAZHEP::ZAZULA (DecNet/HEPNet) | | zazula@uazhe0.physics.arizona.edu (Internet) | |----------------------------------------------------------------------| | "You can twist perceptions, reality won't budge." - Neil Peart | |----------------------------------------------------------------------|