Removing code slows down inner product
|
|
Bugzilla Link |
160 |
Created on |
Nov 26, 2005 23:32 |
Resolution |
INVALID |
Resolved on |
Nov 29, 2005 11:55 |
Version |
1.00beta |
OS |
Linux |
Architecture |
PC |
Attachments |
ipbbslow.sac |
Extended Description
ipbbslow.sac runs MUCH slower if you remove the trailing +/+/ from the code.
This is a Boolean matrix product algorithm, which generates a fairly large
(400x400) result. In order to get a rough idea of whether the code is producing
anything close to the right result, I sum the result rows and then sum that
result, to produce a scalar.
Now, here's the fun part:
1.If you run the code without the +/+/, it runs quite quickly (1.25 seconds).
2.If you run the code WITH the +/+/, it runs extremely slowly (several minutes).
The interesting fact is that, based on "print" statements, the thing that
is taking a long time not the +/+/, but the inner product that precedes it,
and that just ran really quickly.
I was going to make conjectures about the cause, but think I'll just
go have dinner instead.