See issue 1630, we should be 1.5 times slower on the latest version (2.3.1)
https://bitbucket.org/pypy/pypy/issue/1630

We do have plans for being faster, but it will take a while to get there.

Note that your pre-allocation of c is not used by a.dot(b),
you probably want to do a.dot(b, out=c), which does not actually save
much time but seems to be more what you were trying to do.
Matti

On 11/06/2014 7:07 PM, Gayathri J wrote:
Following is my python code for matrix multiplication


import time
a=random.rand(128,128,128,15)
b=np.random.rand(15,15)
c=np.zeros((128,128,128,15), dtype=np.float64)
t=time.time()
c=a.dot(b)
print time.time()-t


Timing for 

pypy -> 3.957
python 2.7 -> .80

So find that the basic matrix dot operation is faster on python 2.7 than on pypy 2.2.1
why is this so? am i missing something?

thanks gayathri



_______________________________________________
pypy-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-dev


_______________________________________________
pypy-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to