Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 having an uproarious good time at the Monastery: (5)
As of 2024-05-30 00:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found