Commits

Anonymous committed 94a67ec

A significant optimisation.

Comments (0)

Files changed (1)

abc-path/generator/generate-abs-path.pl

         # print "Last state = " . Dumper($last_state) . "\n";
         # print "Layout = \n" . $self->get_layout_as_string($last_state->{layout}) . "\n";
 
+        my $next_idx = shift(@{$last_state->{cells}});
+
+        if (!defined($next_idx))
+        {
+            pop(@dfs_stack);
+            next DFS;
+        }
+
         {
             my @connectivity_stack = (index($l, "\0"));
 
             }
         }
 
-        my $next_idx = shift(@{$last_state->{cells}});
-
-        if (!defined($next_idx))
-        {
-            pop(@dfs_stack);
-            next DFS;
-        }
-
         my $next_layout = $l;
         vec($next_layout, $next_idx, 8) = 1+@dfs_stack;
         my $next_state =