fold-reductions with || and && are not lazy!
|Created on||Nov 18, 2005 22:22|
|Resolved on||Aug 09, 2006 10:39|
|Attachments||testfoldwith.sac, testfoldfor.sac, foldfix.sac|
This is probably two bug reports: 1. "fold" does not quick-stop on relational functions, once it has determined that the result can no longer change. For example: or-reduce boolean, once it finds a true. and-reduce boolean, once it finds a false. times-reduce, once it finds a zero. As a result of this, I can't use "fold" in practice for relational reductions, as its performance is dismal. Note that changing the first/last elements of bv to "true" makes no difference in fold performance. So, I tried a for-loop, but its performance is even worse. See testfoldwith.sac 2. for-loop performance is about 10x worse than that of a with-loop. See testfoldfor.sac.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information