-
-
Save wchristian/e95af61c06820643b779 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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