New submission from Gareth Williams <[email protected]>:
Running the following code in PyPy takes around 5 times longer than it does
when
using standard Numpy matrix dot products.
import time
try:
import numpypy
except ImportError:
pass
import numpy
def get_matrix():
import random
n = 502
x = numpy.zeros((n,n), dtype=numpy.float64)
for i in range(n):
for j in range(n):
x[i][j] = random.random()
return x
def main():
x = get_matrix()
y = get_matrix()
a = time.time()
z = numpy.dot(x, y)
b = time.time()
print '%.2f seconds' % (b-a)
main()
----------
messages: 6299
nosy: garethgambit, pypy-issue
priority: performance bug
status: unread
title: Matrix dot product ~5x slower in PyPy
________________________________________
PyPy bug tracker <[email protected]>
<https://bugs.pypy.org/issue1630>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue