Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Perl PDL slower than python numpy

by fanasy (Sexton)
on Sep 20, 2020 at 12:44 UTC ( #11121959=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/home/weizhong/tools/perl-5.32.0/perl
    use PDL;
    $PDL::BIGPDL = 1;
    ...
    $Y = ones(1000,500,500);
    $Z1 = $X + $Y;
    $Z2 = $X / $Y;
    
  2. or download this
    #!/home/weizhong/tools/Python-3.8.5/python
    import numpy as np
    X = np.zeros((1000,500,500))
    Y = np.ones((1000,500,500))
    Z1 = X+Y
    Z2 = X/Y
    
  3. or download this
    #!/bin/csh -f
    echo "Python test1.py:";
    time ./test1.py
    ...
    time ./test1.py
    echo "Perl test1.pl:";
    time ./test1.pl
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://11121959]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2021-03-08 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (127 votes). Check out past polls.

    Notices?