Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Perl PDL slower than python numpy

by fanasy (Sexton)
on Sep 20, 2020 at 12:44 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-25 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found