Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^6: High Performance Game of Life

by eyepopslikeamosquito (Archbishop)
on Aug 13, 2017 at 05:46 UTC ( [id://1197326]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Organism;
    
    ...
    }
    
    1;
    
  2. or download this
    for my $c (keys %{ $cells }) {
    
  3. or download this
    while ( my ($c) = each %{ $cells } ) {
    
  4. or download this
    sub tick {
       my $self  = shift;
    ...
              + exists($cells->{pack 'i2', $x2, $y2}) == 3 ) } @zcells
       } keys %{$cells};
    }
    
  5. or download this
    sub tick {
       my $self  = shift;
    ...
       } keys %{$cells} } = undef;
       $self->{Cells} = \%newcells;
    }
    
  6. or download this
    my @zcells = (
       ($k1 = pack 'i2', $x1, $y1) x !exists($cells->{$k1}),
    ...
       ($k6 = pack 'i2', $x2, $y1) x !exists($cells->{$k6}),
       ($k7 = pack 'i2', $x2, $y0) x !exists($cells->{$k7}),
       ($k8 = pack 'i2', $x2, $y2) x !exists($cells->{$k8})  );
    
  7. or download this
    my @zcells = grep( !exists($cells->{$_}),
       pack('i2', $x1, $y1),
    ...
       pack('i2', $x2, $y1),
       pack('i2', $x2, $y0),
       pack('i2', $x2, $y2) );
    
  8. or download this
    sub tick {
       my $self  = shift;
    ...
       }
       $self->{Cells} = \%newcells;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1197326]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-07-16 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.