Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 403
    • Issues 403
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #1660
Closed
Open
Created Nov 18, 2005 by Robert Bernecky@rbeDeveloper

fold-reductions with || and && are not lazy!

Bugzilla Link 153
Created on Nov 18, 2005 22:22
Resolution FIXED
Resolved on Aug 09, 2006 10:39
Version 1.00beta
OS Linux
Architecture PC
Attachments testfoldwith.sac, testfoldfor.sac, foldfix.sac

Extended Description

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
Assignee
Assign to
Time tracking