[Numpy-discussion] dot() performance depends on data?

Hagen Fürstenau hagen at zhuliguan.net
Fri Sep 10 18:57:55 EDT 2010


> I don't see a difference on my computer. Could you post an example?

I'm attaching a small benchmark script. It multiplies two example arrays
loaded from the file "data" (which you can download from
http://zhuliguan.net/data (157K)), and compares this with multiplying
two random arrays. On two different machines I get an output like the
following:

$ python mm.py
0.0121581554413
0.000909090042114

So the example arrays take more than 10 times as long! Hope this helps
in understanding what's going on...

Cheers,
Hagen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mm.py
Type: text/x-python
Size: 303 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20100911/dcf6e57e/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20100911/dcf6e57e/attachment.sig>


More information about the NumPy-Discussion mailing list