# HG changeset patch # User Mike Pavone # Date 1287110240 14400 # Node ID 4d089503fb51e41115c1bb9d926b9749826b731b # Parent 60906f8803efb40b838e272f3adeaf900283ecfa Performance optimization diff -r 60906f8803ef -r 4d089503fb51 nworker_c.rhope --- a/nworker_c.rhope Wed Oct 13 02:51:56 2010 -0400 +++ b/nworker_c.rhope Thu Oct 14 22:37:20 2010 -0400 @@ -39,7 +39,9 @@ }{ [cond]Empty? { - out <- [set]Subsets <<[ [[set]Subsets>>]Set[[cond]To String, cond] ] + [cond]Simple? + { out <- [set]Variables <<[ Combine[[set]Variables >>, [cond]Variables >>] ] } + { out <- [set]Subsets <<[ [[set]Subsets>>]Set[[cond]To String, cond] ] } }{ out <- set } @@ -94,6 +96,14 @@ } } +Simple?@Condition Set[set:simple,not simple] +{ + ,not simple <- If[[Length[[set]Variables >>]]=[1]] + { + simple,not simple <- If[[Blueprint Of[[set]Subsets >>]]=[Empty Dictionary()]] + } +} + For Backend@Condition Set[set:out,none] { firstvar <- [[set]Variables >>]First