Skip to content

Instantly share code, notes, and snippets.

@wchristian
Created April 16, 2015 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wchristian/e95af61c06820643b779 to your computer and use it in GitHub Desktop.
Save wchristian/e95af61c06820643b779 to your computer and use it in GitHub Desktop.
use strictures;
use PDL;
use 5.010;
use Time::HiRes 'time';
my $piddle = sequence( 10, 12 );
say $piddle;
my $row = slice( $piddle, "0:-1,(3)" );
say $row;
say at( $row, 5 );
my $max = 1000;
my $now = time;
$row->set( 5, 5 ) for 1 .. $max; # this is hella slow
my $elapsed = time - $now;
say sprintf "%12f", $elapsed;
say sprintf "%12f", $elapsed / $max;
say at( $row, 5 );
say $piddle;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment